|
|
вернуться в форумDoes anyone have not WA on test 1(Pascal) 1010. I think that test is incorrect... 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... 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. |
|
|