To admin: about the testdata of this problem.
I tried so many ACed program but all of them can't AC again.
Please make sure if the testdata is still correct.
Thank you!
HI CK (CleverKid :P)! online contest
Hi CK
i didnt think about 1010 alreay...
but i have solved 1036 with so fast time
dont u want to come to talking about it? (a hard challenge:P)
and also
an online contest in USA: (it has only 3day remain time)
http://ace.delos.com/contestgatei wish it be useful 4 u
Any1 who get AC help us...
> I tried so many ACed program but all of them can't AC again.
> Please make sure if the testdata is still correct.
> Thank you!
Any1 who get AC help us... (answer these questions)
Should output be K,K+1???
should we use abs function during calculating the inclination???
Is Ranges Right???
I had test all ways and at all i got WA
I agree CK that test cases are incorrect
Var
n,i,m:longint
x,y :extended;
ans :extended;
begin
ans:=0; ---------> or even 0-maxint! alls are incorrect!
m:=1;
readln(n);
readln(x);
for i:=2 to n do
begin
y:=x;
readln(x);
if x-y>ans then -------> or abs??? (both cases WA:( )
begin
ans:=x-y;
m:=i-1;
end;
end;
writeln(m,' ',m+1);
end.
Check your mail:)
> Hi CK
> i didnt think about 1010 alreay...
> but i have solved 1036 with so fast time
> dont u want to come to talking about it? (a hard challenge:P)
> and also
> an online contest in USA: (it has only 3day remain time)
>
http://ace.delos.com/contestgate> i wish it be useful 4 u
This problem is so easy (+)
The algo is O(N). You are only to find number i (2<=i<=N) such as abs
(f[i]-f[i-1]) is maximal and then to output i-1 and i.
Good luck!
Have you tried to submit your program again??Maybe you will get WA.....
> The algo is O(N). You are only to find number i (2<=i<=N) such as
abs
> (f[i]-f[i-1]) is maximal and then to output i-1 and i.
> Good luck!
So strange! Now it's WA, but solution is obviously correct. Maybe you should wait some days (-)
I had the same troubles with another problem
Послано
Agh 10 фев 2003 13:51
I tried to pass 1174 some days earlier and got WA, but because i'm
sure that it's OK i send it today (nothing changing in code) and
recieve AC
But I Still Get WA
CleverKis sent me his Code and he (or she) Said that it will got AC
but as her (or him) was such as mine
Still WA :(
I dont know why why why???
WA too
> CleverKis sent me his Code and he (or she) Said that it will got
AC
> but as her (or him) was such as mine
> Still WA :(
> I dont know why why why???
Re: This problem is so easy (+)
Послано
Sergey 23 фев 2003 00:40
I used the same algo. Here is the program. Either the tests are
incorrect, or we dont know something :-) A puzzle.
Maybe I am wrong after all?
Var
maxpoint,i,N : integer;
y,max,X : extended;
begin
readln(N);
readln(y);
readln(x);
max:=abs(x-y);
maxpoint:=1;
For i:=3 to n do
begin
y:=x;
readln(x);
if abs(x-y) > max then begin max:= abs(x-y); maxpoint:=i-1;end;
end;
Write(maxpoint,' ', maxpoint + 1);
end.
Check this test:)))
3
1
-2000000000
2000000000
Re: Check this test:)))
Послано
Sergey 6 мар 2003 20:51
And what the answer should be?
2 3 ?
Re: To admin: about the testdata of this problem.
Послано
Cancer 16 мар 2003 17:47
ME TOO
WHY