|
|
back to boardHELP !!!!!!! I don't know why I get wrong answer Posted by Cross 26 May 2002 08:56 var b,c,d:comp; a,n:longint; b1,c1:longint; r:comp; procedure init; begin {assign(input,'1010.in'); reset(input);} readln(n); read(b);read(c); r:=c-b; c1:=2; for a:=3 to n do begin read(d); if (d-c)>r then begin r:=(d-c); c1:=a; end; c:=d; end; writeln(c1-1,' ',c1); end; begin init; end. Re: HELP !!!!!!! I don't know why I get wrong answer 1. change d-c to abs(d-c) 2. change longint to double good luck. |
|
|