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

what's the mater?????! pascal
Posted by Zakharova Alena (Saransk) 21 Jan 2008 16:09
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  s,s2:array[1..100] of string[30];
  i,n,j,k:integer;

begin
  readln(n);
  k:=1;
  for i:=1 to n do s2[i]:='';
  for i:=1 to n do
    readln(s[i]);
  for i:=1 to n-1 do
    for j:=i+1 to n do
      if s[i] = s[j] then
             begin
               s2[k]:=s[i];
               k:=k+1;
             end;
  for i:=1 to k-1 do
    for j:=i+1 to k do
      if s2[i] = s2[j] then s2[j]:='';
  for i:=1 to k-1 do
    if s2[i] <> '' then  writeln(s2[i]);
end.

Edited by author 21.01.2008 16:10

Edited by author 21.01.2008 16:10