80 条题解

  • 0
    @ 2009-08-19 09:42:06

    谁参加了小衫的婚礼?

  • 0
    @ 2009-08-18 19:54:55

    把string改成ansistring

    评测机从sunny变成puppy

    然后就从0分变成ac- -

    我费解死了...

  • 0
    @ 2009-08-11 14:47:06

    字符处理+冒泡排序(!),注意用ansistring

    type

    air=record

    num:longint;

    s:ansistring;

    end;

    var

    x:array[1..1000] of air;

    ss:array[1..1000] of ansistring;

    ch:char;

    a1,a2,a3,a4,n:longint;

    s1,s2:ansistring;

    ex:air;

    procedure chu(l:ansistring);

    begin

    a2:=0;

    a3:=1;

    for a1:=1 to length(l) do

    if l[a1]=' ' then

    begin

    a2:=a2+1;

    ss[a2]:=copy(l,a3,a1-a3);

    a3:=a1+1;

    end;

    a2:=a2+1;

    ss[a2]:=copy(l,a3,length(l)-a3+1);

    n:=a2;

    end;

    begin

    readln(s1);

    readln(s2);

    chu(s1);

    for a1:=1 to n do val(ss[a1],x[a1].num,a2);

    chu(s2);

    for a1:=1 to n do x[a1].s:=ss[a1];

    for a1:=1 to n-1 do

    for a2:=a1+1 to n do

    if x[a1].num>x[a2].num then

    begin

    ex:=x[a1];

    x[a1]:=x[a2];

    x[a2]:=ex;

    end;

    for a1:=1 to n do writeln(x[a1].s);

    end.

  • 0
    @ 2009-08-02 12:40:37

    请不要鄙视这题的ac率,要鄙视就鄙视测评系统或数据

    c语言用gets全部128错误,再自己写读入函数又是全128,似乎输入中根本没有换行(也许是由众多因素共同导致的),最后无奈不得不以小数点来判断,然而数据实在太弱,本来有可能错的判断方法竟然ac了

    对这题彻底无语,以后坚决绕开考输入输出的题

  • 0
    @ 2009-07-24 18:20:10

    没有用排序那么麻烦

    拿一个数组A记录一下k出现的位置i(a[k]:=i)

    读入字符串数组b(不能直接读入)

    每一次输出b[a[i]]就可以了

    代码:

    program p1389;

    var a:array[1..1000]of longint;

    b:array[1..1000]of ansistring;

    n,i,k,p:longint;

    s:ansistring;

    begin

    while not(seekeoln) do

    begin

    inc(n);

    read(k);

    a[k]:=n;

    end;

    readln;

    read(s);

    for i:=1 to n-1 do

    begin

    p:=pos(' ',s);

    b[i]:=copy(s,1,p-1);

    delete(s,1,p);

    end;

    b[n]:=s;

    for i:=1 to n do

    writeln(b[a[i]]);

    end.

  • 0
    @ 2009-07-24 14:21:05

    program das;

    type point=record

    id:integer;

    score:ansistring;

    end;

    var

    s1:ansistring;

    a:array[1..1000] of point;

    i,j,k,n:longint;

    procedure sort(l,r:longint);

    var i,j,x:longint;

    y:point;

    begin

    i:=l;j:=r;

    x:=a[(l+r) shr 1].id;

    repeat

    while a[i].idx do dec(j);

    if ij;

    if il then sort(l,j);

    end;

    begin

    readln(s1);

    repeat

    inc(n);

    j:=pos(' ',s1);

    if j=0 then

    begin

    val(copy(s1,1,length(s1)),a[n].id,k);

    delete(s1,1,length(s1));

    end

    else

    begin

    val(copy(s1,1,j-1),a[n].id,k);

    delete(s1,1,j);

    end;

    until j=0;

    readln(s1);

    repeat

    inc(i);

    j:=pos(' ',s1);

    if j=0 then

    begin

    a[i].score:=copy(s1,1,length(s1));

    delete(s1,1,length(s1));

    end

    else

    begin

    a[i].score:=copy(s1,1,j-1);

    delete(s1,1,j);

    end;

    until j=0;

    sort(1,n);

    for i:=1 to n do writeln(a[i].score);

    end.

    晕ING

  • 0
    @ 2009-07-14 15:36:32

    ansistring!

  • 0
    @ 2009-07-14 01:38:39

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    #include

    using namespace std;

    int main()

    {

    string st[1000];

    int order[1000],n=0,i;

    do cin>>i,order=n++; while(cin.get()!='\n');

    for(i=0;i>st);

    for(i=0;i

    • @ 2016-08-14 17:49:47

      你这个B我给满分

    • @ 2016-08-14 17:50:48

      然而分分钟CE

  • 0
    @ 2009-07-10 11:46:31

    被小数点阴了

  • 0
    @ 2009-07-02 18:25:16

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    我是过来人。。

    此题,首先是字符串处理,然后快排。。

    记住。。

    一定要用 ANSISTRING

    因为

    string是255位

    题目说是一个不超过255的浮点数

    即最长255位,加上个小数点,即256位

    天啊,他好猥琐啊

    他是骗子

    本人由衷地看不起他

    大家不要被他蒙骗了啊

    他居然拿这一个小数点来浪费我的AC率!!!!!!

    注意啊啊啊啊啊啊啊

  • 0
    @ 2009-05-23 13:12:36

    纯考输入输出的水题 快排+字符串+ansistring

  • 0
    @ 2009-03-09 16:24:18

    天啊...1001*256零分,1001*500就AC...

  • 0
    @ 2009-01-05 21:47:31

    我寒 果然是每个浮点数都大于255位

    强烈BS

    不过为什么出错的地方都会输出 111111.....

  • 0
    @ 2008-12-29 22:28:30

    string st[1000];

    int order[1000],n=0,i;

    do cin>>i,order=n++; while(cin.get()!='\n');

    for(i=0;i>st);

    for(i=0;i

  • 0
    @ 2008-11-03 18:59:56

    ansistring!!!!!!!!啊,我的ac率啊!!!!!!!

  • 0
    @ 2008-10-16 18:29:10

    vijos总是这么顶歇

    为什么总是要撒谎!

    不过也好

    我知道了ansistrin

    谢谢大牛们!

  • 0
    @ 2008-10-08 20:31:47

    真是郁闷

    明明有写小于255 结果还是要用ansistring

  • 0
    @ 2008-09-20 20:06:43

    注意注意!在任何你想使用string的地方用ansistring,就能Ac!

  • 0
    @ 2008-09-18 13:42:40

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    50AC纪念

  • 0
    @ 2008-09-15 17:16:36

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    ansistring!!!!!! 各位注意啦 不要步我的后尘 呜呜呜~~~~

    快排+字符串处理

信息

ID
1389
难度
4
分类
模拟 点击显示
标签
(无)
递交数
2190
已通过
915
通过率
42%
被复制
9
上传者