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 1496. Spammer

test #8 WA HELP!!
Posted by fender 8 Feb 2008 21:11
what's wrohg with my code:
var a: array [1..100] of record
nam: string;
                                coun: integer;
                         end;
    n, m, c, i, j: integer;
    s: string;
begin
 readln(n);
 m:=0;
 for i:=1 to n do
 begin
  readln(s);
  c:=0;
  for j:=1 to m do if s=a[j].nam then
  begin
   inc(a[j].coun);
   inc(c);
  end;
  if c=0 then
  begin
   inc(m);
   a[m].nam:=s;
   a[m].coun:=0;
  end;
 end;
 for i:=1 to m do if a[i].coun>1 then writeln(a[i].nam);
end.
p.s.size of string doesnt matter

Edited by author 08.02.2008 21:11