55 条题解

  • 0
    @ 2008-11-06 09:48:40

    注意!找到错误单词一定要 break !

  • 0
    @ 2008-10-27 23:00:06

    var

    a:array[1..100]of string;

    i,j,k,p,n,tot:longint;

    s,ss,ans:string;

    function judge:boolean;

    begin

    p:=0;

    if length(a[i])length(ss) then exit(false);

    for j:=1 to length(ss) do

    if (a[i][j]ss[j])and(abs( ord(a[i][j])-ord(ss[j]) )32) then

    inc(p);

    if p=1 then exit(true) else exit(false);

    end;

    begin

    readln(n);

    readln(s);

    for i:=1 to n do

    readln(a[i]);

    while s[1]=' ' do delete(s,1,1);

    while s[length(s)]=' ' do delete(s,length(s),1);

    while pos(' ',s)0 do delete(s,pos(' ',s),1);

    s[length(s)]:=' ';{'!'-->' '}

    while s'' do

    begin

    k:=pos(' ',s);

    ss:=copy(s,1,k-1);

    delete(s,1,k);

    for i:=1 to n do

    if Judge then begin ans:=ans+a[i]+' ';inc(tot);break;end;

    if not judge then ans:=ans+ss+' ';

    end;

    writeln(tot);

    ans[length(ans)]:='!';

    if copy(ans,1,4)='none' then ans[1]:='N';//本来不想这么干的

    if copy(ans,1,3)='who' then ans[1]:='W';//本来不想这么干的

    writeln(ans);

    end.

  • 0
    @ 2008-10-26 20:04:45

    Oh,my God!今天读了半天题,又想了好久,后来一看,自己在AC的名单中(刚才上的是小号啊,不在大号上),直接晕翻…………现在去看了看自己AC的code,发现有点看不懂耶,彻底晕翻…………(我还是有RP的,不会抄题解的)

  • 0
    @ 2008-10-17 16:48:55

    不要激动…………两个小号连翻上阵以及阵亡…………monocofe和旗木卡评测机……有劳你们了……去状态里看看,连着很长一列都是我的号………………………………第二个点错的人,建议:

    if copy(word[top],length(word[top])-3,3)='fve' then

    write(copy(word[top],1,length(word[top])-1),'!')

    else

    write(word[top],'!');

    多次尝试得到的精华!

  • 0
    @ 2008-10-14 20:34:40

    悼念我的AC率..

    终于..

  • 0
    @ 2008-10-14 20:21:02

    ``

    确实很恶心。

    不过还得尊重 ‘玛雅-影之歌’‘!

    Iek.Chan

  • 0
    @ 2008-10-05 12:12:18

    吐了

  • 0
    @ 2008-10-04 08:44:46

    四个字:极其恶心。。。

  • 0
    @ 2008-09-19 19:04:31

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

  • 0
    @ 2008-09-19 19:08:06

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案错误... ├ 标准行输出 None...

     ├ 错误行输出 none...

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案错误... ├ 标准行输出 Who ...

     ├ 错误行输出 who...

    ---|---|---|---|---|---|---|---|-

    Unaccepted 有效得分:60 有效耗时:0ms

    大写!!!

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案错误...程序输出比正确答案长

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Unaccepted 有效得分:80 有效耗时:0ms

    ????????

    玛维-影之歌:

    关于第2句的问题...是我疏忽所致..不好意思...

    所以大家cheat把...加个空格就完事了。

    我欲怒!

    编译通过...

    ├ 测试数据 01:运行超时|格式错误...

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Unaccepted 有效得分:80 有效耗时:0ms

    评测机找死么?我^一样的程序啊!!!

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

  • 0
    @ 2008-09-19 18:14:31

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    终于A了.

  • 0
    @ 2009-07-13 20:51:23

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案错误...程序输出比正确答案长

    ---|---|---|---|---|---|---|---|-

    Unaccepted 有效得分:80 有效耗时:0ms

    最后一个是什么数据啊?

    var

    a,b:array[1..10000]of string[15];

    s:string;

    m,n,i,j,l:longint;

    ans:longint;

    procedure work(l,aw,bw:longint);

    var

    i,k:longint;

    begin

    k:=0;

    for i:=1 to l do

    begin

    if a[aw][i]b[bw][i]

    then inc(k);

    if k=2

    then exit;

    end;

    if k0

    then begin

    b[bw]:=a[aw];

    inc(ans);

    end;

    end;

    begin

    readln(n);

    readln(s);

    for i:=1 to n do

    readln(a[i]);

    l:=pos('!',s);

    dec(l);

    m:=1;

    for i:=1 to l do

    begin

    if s[i]' '

    then

    b[m]:=b[m]+s[i];

    if s[i]=' '

    then inc(m);

    end;

    ans:=0;

    b[1][1]:=chr(ord(b[1][1])+32);

    for i:=1 to n do

    for j:=1 to m do

    if length(a[i])=length(b[j])

    then work(length(b[j]),i,j);

    writeln(ans);

    b[1][1]:=chr(ord(b[1][1])-32);

    write(b[1]);

    for i:=2 to m do

    write(' ',b[i]);

    write('!');

    end.

    哪个大牛能帮我找错,我不知道哪错了,搞了很久!

  • 0
    @ 2008-09-10 00:15:01

    两个字:恶心

  • 0
    @ 2008-09-01 13:50:01

    求助,为什么只过两个点?

    1.提示英语中末尾有空格

    2.字典末尾有空格

    3.大小写不一样不算数。

    4.开头大小写不一样不算数

    除了第三项其他都考虑了,难道是大小写问题?

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案错误...程序输出比正确答案长

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案错误...程序输出比正确答案长

    program vijos1419;

    var e,i,j,k,l,m,n:longint;ss,s,t,ou:string;a:array[1..100]of string;

    begin

    readln(n);

    readln(s);

    for i:=1 to n do

    begin readln(a[i]);if a=' ' then delete(a[i],length(a[i]),10);end;

    a[1,1]:=chr(ord(a[1,1])-32);

    {error num}e:=0;

    if s[length(s)]=' ' then delete(s,length(s),10);

    s:=s+' ';

    i:=1;j:=pos(' ',s);

    while (s'') do

    begin

    t:=copy(s,i,(j-i));if t=' ' then break;

    for k:=1 to n do

    if length(t)=length(a[k]) then

    begin

    m:=0;

    for l:=1 to length(t) do

    if t[l]a[k,l] then inc(m);

    if m=1 then

    begin inc(e);t:=a[k];end;

    end;

    delete(s,i,(j-i)+1);

    ou:=ou+t;ou:=ou+' ';

    i:=1;j:=pos(' ',s);

    end;

    delete(ou,length(ou),1);

    writeln(e);

    writeln(ou);

    end.

  • 0
    @ 2008-08-26 14:14:21

    句子单词之间可能有2个及以上‘ ’吗?

    拜托速速回答~~

    什么错误?

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案错误...程序输出比正确答案长

    ---|---|---|---|---|---|---|---|-

    Unaccepted 有效得分:80 有效耗时:0ms

  • 0
    @ 2008-08-25 23:12:06

    提示大家一下。。

    1.提示英语中末尾有空格

    2.字典末尾有空格

    3.大小写不一样不算数。

    4.开头大小写不一样不算数

  • 0
    @ 2008-08-25 20:25:06

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    我第一次也忘写了

  • 0
    @ 2008-10-16 11:52:50

    关于第2句的问题...是我疏忽所致..不好意思...

    所以大家cheat把...加个空格就完事了。

    关于最后一个点的问题

    对于一个单词是否错误,当且仅当错误单词与正确单词长度相同才算.

  • 0
    @ 2008-08-25 14:51:08

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    我第一次交竟然也忘了写单词的个数...郁闷...

  • 0
    @ 2008-08-24 23:26:08

    4

    At lest we sharl hsve revenge!

    at

    last

    shall

    have

    试试这组数据 注意 第二行 行尾有多余空格

信息

ID
1419
难度
7
分类
字符串 | 模拟 点击显示
标签
递交数
1135
已通过
201
通过率
18%
被复制
3
上传者