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 1010. Discrete Function

To admin: about the testdata of this problem.
Posted by CleverKid 7 Feb 2003 16:15
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
Posted by Locomotive 7 Feb 2003 19:30
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
Any1 who get AC help us...
Posted by Locomotive 7 Feb 2003 20:30
> 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)
Posted by Locomotive 7 Feb 2003 20:34
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:)
Posted by CleverKid 7 Feb 2003 21:25
> 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 (+)
Posted by Dmitry 'Diman_YES' Kovalioff 8 Feb 2003 17:48
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.....
Posted by CleverKid 8 Feb 2003 22:09
> 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 (-)
Posted by Dmitry 'Diman_YES' Kovalioff 9 Feb 2003 18:22
I had the same troubles with another problem
Posted by Agh 10 Feb 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
Posted by Locomotive 10 Feb 2003 18:10
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
Posted by wangchen1ren 14 Feb 2003 22:37
> 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 (+)
Posted by Sergey 23 Feb 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:)))
Posted by Valentin Mihov 25 Feb 2003 18:08
3


1


-2000000000


2000000000
Re: Check this test:)))
Posted by Sergey 6 Mar 2003 20:51
And what the answer should be?
 2 3 ?
Re: To admin: about the testdata of this problem.
Posted by Cancer 16 Mar 2003 17:47
ME TOO
WHY