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 1563. Bayan

WA 2. = =
Posted by Shyu SeiMin 8 Jul 2009 09:06
Re: WA 2. = =
Posted by Shyu SeiMin 8 Jul 2009 09:09
My code:

var
  a:array[1..1000]of string;
  b:array[1..1000]of integer;
  n,i,j,m,max:integer;
  s:string;
  c:boolean;
begin
  readln(n);
  for i:=1 to n do
    begin
      c:=true;
      readln(s);
      for j:=1 to m do
        if s=a[j]
          then begin
                 inc(b[j]);
                 c:=false;
                 break;
               end;
      if c then begin
                  inc(m);
                  a[m]:=s;
                  inc(b[m]);
                end;
    end;
  for i:=1 to n do
    if max<b[i]
      then max:=b[i];
  writeln(max);
end.
Re: WA 2. = =
Posted by Shyu SeiMin 8 Jul 2009 09:13
I know.
I understood that the wrong.^^
Re: WA 2. = =
Posted by shalamov.ivan 4 Nov 2015 12:59
if c=true then begin