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

Why my program get wrong answer?(I think it's right)
Posted by Huang Yizheng 16 Oct 2001 18:53
var s,before,bf,i,n:longint;
    max:comp;
begin
 readln(n);
 readln(bf);
 readln(before);
 max:=before*1.0-bf;
 s:=1;
 for i:=3 to n do
  begin
   readln(bf);
   if bf*1.0-before>max then
    begin
     s:=i-1;
     max:=bf*1.0-before;
    end;
   before:=bf;
  end;
 writeln(s,' ',s+1);
end.
Re: Why my program get wrong answer?(I think it's right)
Posted by Dinu Adrian Florin 5 May 2004 14:05
For some strange reason, only c++ sources get AC
Re: Why my program get wrong answer?(I think it's right)
Posted by hello 6 May 2004 15:26
Why ?