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 1190. Bar of Chocolate

Task described wrong!
Posted by TimoX 17 Aug 2007 02:30
I thing, that my program solve this task!
But wrong Test#4.
What I hadn't read?
Sum of all thing must be 100 00?
I don't know...
[или я просто не фтыкаю информатику  ;)]
==== SOURSE ====

Var
 cur,last:longint;
 i,n:longint;
 s:string;
 f:boolean;
Begin
 readln(n);
 readln(s);
 last:=GetProc(s);
 sum:=0;
 f:=false;
 for i:=2 to n do
    Begin
     readln(s);
     cur:=GetProc(s);
     if (last>=cur) then cur:=last
                    else
                      Begin
                         f:=true;
                         cur:=last;
                      End;
    End;
 if f then writeln('NO')
      else writeln('YES');
End.

*** GetProc - returne procent of thing.