ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1418. Military Story

Show all messages Hide all messages

WA 10 HeypaBHoBeceH 26 Feb 2009 09:39
Is there a trick? I must forget something, because i tried 3 different implementations for finding the current convex hull of the points, and all three get WA 10...
Re: WA 10 Vedernikoff Sergey (HSE: EconomicsForever!) 26 Feb 2009 18:29
What does you program output on the following test:
3
0 0
1 1
2 2

?
Re: WA 10 HeypaBHoBeceH 26 Feb 2009 23:55
Vedernikoff Sergey (HSE: EconomicsForever!) wrote 26 February 2009 18:29
What does you program output on the following test:
3
0 0
1 1
2 2

?

0
Re: WA 10 Vedernikoff Sergey (HSE: EconomicsForever!) 27 Feb 2009 00:03
It's ok. Try this:
8
0 0
0 1
0 2
1 0
1 2
2 0
2 1
2 2
Re: WA 10 HeypaBHoBeceH 27 Feb 2009 12:08
Vedernikoff Sergey (HSE: EconomicsForever!) wrote 27 February 2009 00:03
It's ok. Try this:
8
0 0
0 1
0 2
1 0
1 2
2 0
2 1
2 2
1 :)
Is there a chance, you looked at my code? It's not so long, and I'll put some comments. If you don't want to get involved, I'll understand :)
Re: WA 10 Vedernikoff Sergey (HSE: EconomicsForever!) 27 Feb 2009 14:58
Ok, send it to nick[youknowwhat]inbox[youknowwhatagain]ru, using goryinyich instead of nick
Re: WA 10 HeypaBHoBeceH 27 Feb 2009 17:18
message is sent, thank you in advance!
Re: WA 10 Vedernikoff Sergey (HSE: EconomicsForever!) 28 Feb 2009 02:43
Received. But I'll have time to look at it only in saturday-sunday...
Re: WA 10 Vedernikoff Sergey (HSE: EconomicsForever!) 28 Feb 2009 03:52
Your code gets WA on the following test:
33
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
-1 1
-2 2
-3 3
-4 4
-5 5
-6 6
-7 7
-8 8
-9 9
-10 10
-11 11
0 -1
0 -2
0 -3
0 -4
0 -5
0 -6
0 -7
0 -8
0 -9
0 -10
0 -11

By the way, even if you correct the error, it will get TLE: for the test generated by the following Pascal code you program doesn't finish the job in 1 minute:
var
  i, n: integer;
begin
  n := 1333;
  rewrite (output, 'input.txt');
  writeln (3*n);
  for i := 1 to n do
    writeln (i , ' ', i);
  for i := 1 to n do
    writeln (-i , ' ', i);
  for i := 1 to n do
    writeln (0 , ' ', -i);
end.
Re: WA 10 HeypaBHoBeceH 1 Mar 2009 03:24
AC atlast :) Thanks man, I had 2 big problems, but all fixed with +10 lines code. Thank you for great test!
Re: WA 10 Andres 16 Mar 2010 05:28
Hey how did you solve the TLE?
Re: WA 10 Andres 16 Mar 2010 06:22
nevermind.. .acos takes a looot of time