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 1135. Recruits

HELP !!!!!!! I don't know why I get wa
Posted by Cross 23 Jun 2002 19:22
program p1135;
var a,b,n:integer;
    i:longint;
    m1:string[1];
begin
  readln(n);
  while not eof do
  begin
    read(m1);
    if (m1='<')or(m1='>') then a:=a+1;
    if m1='<' then
    begin
      b:=b+1;
      i:=i+a-b;
    end;
    if eoln then
    begin
      readln;
      a:=0;
      b:=0;
    end;
  end;
  writeln(i);
end.
Re: HELP !!!!!!! I don't know why I get wa
Posted by Vokin Andrei (vokin_andrei@mail.ru) 21 Jul 2002 15:00
If the process is infinite then the program should write the
word &#8220;NO&#8221; to the output file.
no right
Posted by Dilyan 13 May 2005 21:47
the proccess can not be infinite
The rank is uniform
Posted by Виктор Крупко 13 May 2005 22:20
Do not null "A" and "B"