记录编号 |
40755 |
评测结果 |
AAAAAAAAAA |
题目名称 |
[暑假培训2012] 单词缩写 |
最终得分 |
100 |
用户昵称 |
三木公 |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.006 s |
提交时间 |
2012-07-19 08:58:54 |
内存使用 |
2.67 MiB |
显示代码纯文本
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.