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 1088. Ilya Murometz

Please help me,I get WA on test19!!!!!
Posted by tantian 30 Jul 2006 12:44
program ex;
var     s,d,e,f,dp,ep,h,i:longint;
begin
        readln(d,e,f,dp,ep,h);
        s:=1;
        for i:=1 to f do
                s:=s*2;
        if (dp>s div 2)and(ep>s div 2) then
                if abs(d-e)>h then
                        writeln('NO')
                else
                        writeln('YES')
        else
                if (dp<=s div 2)and(ep<=s div 2) then
                        if abs(d-e)>h then
                                writeln('NO')
                        else
                                writeln('YES')
                else
                        if abs((f-d)+(f-e))>h then
                                writeln('NO')
                        else
                                writeln('YES');
end.