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

Does anyone have not WA on test 1(Pascal) 1010. I think that test is incorrect...
Posted by marina_ufa 6 May 2004 14:29
this is my program

{N+}
var n,i,ans : longint;
    max,y1,y2 : double; { extended }

BEGIN
  readln(n);
  read(y1);

  max := -MaxLongint;
  for i := 2 to n do
  begin
    read(y2);
    if max < abs(y2-y1) then begin ans := i; max := abs(y2-y1); end;
  end;

  writeln(ans-1,' ',ans);
END.
Because of the language...
Posted by 198808xc 6 May 2004 14:50
Don't try any times again to submit this problem in the language PASCAL.
It is impossible for you to get the answer 'Accepted'.
If you have a friend who knows how to write a C++ program, you can ask him(her) to help you.

That's all.