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 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
  readln(n,np);
  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
    readln(otk);
    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
  readln(x,p); if x>100 then x:=100;
  IF P>20 then p:=20;
  readln(c);
  readln(m,mp,ygol);
  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
  readln(n,np);
  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
    readln(otk);
    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
  readln(x,p); if x>100 then x:=100;
  IF P>20 then p:=20;
  readln(c);
  readln(m,mp,ygol);
  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

Your answer: STOP
Correct answer: BACKWARD 1