记录编号 40755 评测结果 AAAAAAAAAA
题目名称 [暑假培训2012] 单词缩写 最终得分 100
用户昵称 Gravatar三木公 是否通过 通过
代码语言 Pascal 运行时间 0.006 s
提交时间 2012-07-19 08:58:54 内存使用 2.67 MiB
显示代码纯文本
  1. var
  2. i,j,k,a,b,c,m,n:longint;
  3. x:array[1..100,1..100]of string;
  4. s:array[1..100,1..100]of longint;
  5. t:array[1..100]of longint;
  6. y:array[1..100]of string;
  7. o:char;
  8.  
  9. begin
  10. assign(input,'abbreviation.in');
  11. reset(input);
  12. assign(output,'abbreviation.out');
  13. rewrite(output);
  14.  
  15. readln(a);
  16. for i:=1 to a do t[i]:=1;
  17.  
  18. for i:=1 to a do readln(y[i]);
  19.  
  20. for i:=1 to a do begin k:=0;
  21. repeat
  22. inc(k);
  23. o:=y[i,k];
  24. if o<>' ' then
  25. begin
  26. if o in ['a'..'z'] then o:=chr(ord(o)-32);
  27. x[i,t[i]]:=x[i,t[i]]+o;
  28. inc(s[i,t[i]]);
  29. end else
  30. t[i]:=t[i]+1;
  31. until k>length(y[i])-1; end;
  32.  
  33. for i:=1 to a do
  34. begin
  35. for j:=1 to t[i] do
  36. if (s[i,j]>=3)and(x[i,j]<>'AND')and(x[i,j]<>'FOR')and(x[i,j]<>'THE')
  37. then write(x[i,j,1]);
  38. writeln;
  39. end;
  40.  
  41.  
  42. close(input);
  43. close(output);
  44. end.