比赛 20130725暑期B班1测 评测结果 WWWWWWWWWW
题目名称 单词缩写 最终得分 0
用户昵称 三木公 运行时间 0.006 s
代码语言 Pascal 内存使用 2.67 MiB
提交时间 2012-07-18 11:25:29
显示代码纯文本
var
i,j,k,a,b,c,m,n:longint;
x:array[1..100,1..100]of string;
s:array[1..100,1..100]of longint;
t:array[1..100]of longint;
y:array[1..100]of string;
o:char;

begin
assign(input,'abbreviation.in');
reset(input);
assign(output,'abbreviation.out');
rewrite(output);

readln(a);
for i:=1 to a do t[i]:=1;

for i:=1 to a do readln(y[i]);

for i:=1 to a do begin k:=0;
repeat
inc(k);
o:=y[i,k];
if o<>' ' then
begin
if o in ['a'..'z'] then o:=chr(ord(o)-32);
x[i,t[i]]:=x[i,t[i]]+o;
inc(s[i,t[i]]);
end else
t[i]:=t[i]+1;
until k>length(y[i])-1;  end;

for i:=1 to a do
begin
 for j:=1 to t[i] do
if (s[i,j]>=3)and(x[i,j]<>'AND ')and(x[i,j]<>'FOR ')and(x[i,j]<>'THE ')
 then write(x[i,j,1]);
writeln;
end;


close(input);
close(output);
end.