ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

## Discussion of Problem 1299. Psylonians

wa21 give me please wrong test
Posted by Виктор Крупко 22 Aug 2005 04:04
var
x,p,col,m,mp,ygol,n,np,otk:longint;
c:char;
procedure oxrana;
begin
if m=0 then writeln('STOP')
else
if abs(ygol)<5 then writeln('FIRE ',p)
else
if ygol<0 then writeln('RIGHT ',x)
else writeln('LEFT ',x);
end;
procedure zashita;
begin
if m*20>=p then
if abs(ygol)<5 then writeln('FIRE ',p)
else writeln('BACKWARD ',x)
else oxrana;
end;
procedure ataka;
begin
if n*np>m*mp*3 then
if abs(ygol)<10 then writeln('FIRE ',p)
else writeln('FRONT ',x)
else
if abs(ygol)<5 then writeln('FIRE ',p)
else writeln('BACKWARD ',x);
end;
procedure patrul;
var ygl:longint;
begin
if otk<-90 then ygl:=180-abs(otk);
if otk>90 then ygl:=-(180-abs(otk));
if abs(ygol)<5 then zashita
else
if (abs(otk)>20)  then
if ygl<0 then writeln('LEFT ',x)
else writeln('RIGHT ',x)
else writeln('BACKWARD ',x)
end;
begin
IF P>20 then p:=20;
if c='G' then oxrana;
if c='D' then zashita;
if c='A' then ataka;
if c='P' then patrul;
end.
wa22 PEOPLE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Posted by +FAMAS+ 23 Aug 2005 04:50
var
x,p,col,m,mp,ygol,n,np,otk:longint;
c:char;
procedure oxrana;
begin
if m=0 then writeln('STOP')
else
if abs(ygol)<5 then writeln('FIRE ',p)
else
if ygol<0 then writeln('RIGHT ',x)
else writeln('LEFT ',x);
end;
procedure zashita;
begin
if m*20>=p then
if abs(ygol)<5 then writeln('FIRE ',p)
else writeln('BACKWARD ',x)
else oxrana;
end;
procedure ataka;
begin
if n*np>m*mp*3 then
if abs(ygol)<10 then writeln('FIRE ',p)
else writeln('FRONT ',x)
else
if abs(ygol)<5 then writeln('FIRE ',p)
else writeln('BACKWARD ',x);
end;
procedure patrul;
begin
if (m<>0) then  zashita
else
begin
if abs(otk)<=20 then writeln('FRONT ',x)
else
if (otk<=-159) or (otk>=160) then writeln('BACKWARD ',x)
else
begin
if otk<-90 then otk:=180-abs(otk);
if otk>90 then otk:=-(180-abs(otk));
if otk<0 then writeln('LEFT ',x) else writeln('RIGHT ',x);
end;
END;
end;
begin
IF P>20 then p:=20;
if c='G' then oxrana;
if c='D' then zashita;
if c='A' then ataka;
if c='P' then patrul;
end.
Re: wa22 PEOPLE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Posted by Tolstobrov_Anatoliy[Ivanovo SPU] 23 Aug 2005 05:19

sorry i can't.
A test for you (+)
Posted by Michael Rybak (accepted@ukr.net) 11 Feb 2006 04:28
1 1
P
0 0 0
165
STOP