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

WA #7! Please? give me this test!
Posted by Кирилл 2 Feb 2012 20:57
Pascal


var a,b: array[1..100] of string;
    i,j,k,n: integer;
    s: string;
    f: boolean;
begin
readln(n);
for i:=1 to n do
 begin
 readln(s);
 f:=false;
 for j:=1 to n do
  if a[j] = s then f:=true;
 if f = false then a[i]:=s
 else begin
      f:=false;
      for j:=1 to n div 2 do
       if b[j] = s then f:=true;
      if f = false then b[i]:=s;
      end;
 end;
for i:=1 to n div 2 do
 if b[i] <> '' then writeln(b[i]);

end.
Re: WA #7! Please? give me this test!
Posted by MaxxxCoder 15 Jun 2023 22:12
just 0