508 条题解

  • 0
    @ 2008-12-07 16:39:45

    很难啊!

    不会做啊!

    大牛们教教我吧!

    可怜我这个乞丐仔吧!

    我已经五天没有吃饭啦!

    我已经三年没有洗澡啦!

    行行好,给几个零钱,让我吃点面包粒吧!

    我很惨啊!

    救救我啊!

    我上有九十岁的祖母!

    下有刚出生的孙子!

    一家有二十多个人,帮帮我吧!

  • 0
    @ 2008-12-06 15:28:19

    var

    sum,max:longint;

    k,n,i,c:integer;

    s:string;

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

    f:array[1..1000]of longint;

    wen,fen,ping:array[1..100]of integer;

    gan,xibu:array[1..100]of boolean;

    begin

    readln(n);

    for i:=1 to n do

    begin

    readln(s);

    k:=pos(' ',s);

    name[i]:=copy(s,1,k-1);

    delete(s,1,k);

    k:=pos(' ',s);

    val(copy(s,1,k-1),fen[i],c);

    delete(s,1,k);

    k:=pos(' ',s);

    val(copy(s,1,k-1),ping[i],c);

    delete(s,1,k);

    if s[1]='Y' then gan[i]:=true else gan[i]:=false;

    if s[3]='Y' then xibu[i]:=true else xibu[i]:=false;

    delete(s,1,4);

    val(s,wen[i],c);

    end;

    fillchar(f,sizeof(f),0);

    max:=0;sum:=0;

    for i:=1 to n do

    begin

    if (fen[i]>80)and(wen[i]>=1)then f[i]:=f[i]+8000;

    if (fen[i]>85)and(ping[i]>80)then f[i]:=f[i]+4000;

    if fen[i]>90 then f[i]:=f[i]+2000;

    if (fen[i]>85)and(xibu[i]=true)then f[i]:=f[i]+1000;

    if (ping[i]>80)and(gan[i]=true )then f[i]:=f[i]+850;

    sum:=sum+f[i];

    if max=0 then max:=i

    else

    if f[i]>f[max]then max:=i;

    end;

    writeln(name[max]);

    writeln(f[max]);

    writeln(sum);

    end.

  • 0
    @ 2008-12-11 00:13:15

    program jingjin;

    var t,max:record

    name:string;

    qimo:0..100;

    banji:0..100;

    ganbu:boolean;

    xibu:boolean;

    lunwen:0..10;

    all:longint;

    end;

    n,i,j,s,g1,g2,num:longint;

    gan,xi:char;

    ming:char;

    begin

    readln(n);

    max.all:=0;

    t.all:=0;

    s:=0;

    for i:=1 to n do

    begin

    with t do

    while ming' ' do

    begin

    name:=name+ming;

    read(ming);

    end;

    with t do

    begin

    read(g1,g2,gan,xi,num);

    qimo:=g1;

    banji:=g2;

    if gan='Y' then ganbu:=true;

    if gan='N' then ganbu:=false;

    if xi='Y' then xibu:=true;

    if xi='N' then xibu:=false;

    lunwen:=num;

    end;

    if (t.qimo>80)and(t.lunwen>=1) then t.all:=t.all+8000;

    if t.qimo>85 then

    begin

    if t.banji>80 then t.all:=t.all+4000;

    if t.xibu then t.all:=t.all+1000;

    end;

    if t.qimo>90 then t.all:=t.all+2000;

    if (t.banji>80)and(t.ganbu) then t.all:=t.all+850;

    if t.all>max.all then max:=t;

    s:=s+t.all;

    writeln;

    end;

    writeln(max.name);

    writeln(max.all);

    writeln(s);

    end.

  • 0
    @ 2008-12-02 13:44:57

    program p1001;

    var s,name,maxname,xsgb,xbxs:string;

    s1,i,e,v,max,lw,pj,py:longint;

    ok,n,l:integer;

    procedure dq;

    var e,i:integer;

    begin

    for i:=1 to l do if s[i]=' ' then begin e:=i; break; end;

    name:=copy(s,1,e-1); delete(s,1,e);

    for i:=1 to l do if s[i]=' ' then begin e:=i; break; end;

    val(copy(s,1,e-1),pj,ok); delete(s,1,e);

    for i:=1 to l do if s[i]=' ' then begin e:=i; break; end;

    val(copy(s,1,e-1),py,ok); delete(s,1,e);

    for i:=1 to l do if s[i]=' ' then begin e:=i; break; end;

    xsgb:=copy(s,1,e-1); delete(s,1,e);

    for i:=1 to l do if s[i]=' ' then begin e:=i; break; end;

    xbxs:=copy(s,1,e-1); delete(s,1,e); val(s,lw,ok);

    end;

    begin

    readln(n); max:=0;

    for i:=1 to n do begin

    readln(s); v:=0; l:=length(s);

    dq;

    if (lw>=1)and(pj>80) then v:=v+8000;

    if (pj>85)and(py>80) then v:=v+4000;

    if pj>90 then v:=v+2000;

    if (pj>85)and(xbxs='Y') then v:=v+1000;

    if (py>80)and(xsgb='Y') then v:=v+850;

    s1:=s1+v; if v>max then begin max:=v; maxname:=name; end;

    end;

    writeln(maxname); writeln(max); writeln(s1);

    end.

    AC了了了了了了

  • 0
    @ 2008-11-28 19:08:58

    type

    student=

    record

    scholar:longint;

    name:string;

    end;

    var

    n,d1,d2,d5,i,maxscholar,total:longint;

    ch,d3,d4:char;

    s:array [1..100] of student;

    maxname:string;

    begin

    maxscholar:=0;

    total:=0;

    for i:=1 to 100 do

    begin

    s[i].scholar:=0;

    s[i].name:='';

    end;

    readln(n);

    for i:=1 to n do

    begin

    d1:=0;

    d2:=0;

    d5:=0;

    read(ch);

    repeat

    s[i].name:=s[i].name+ch;

    read(ch);

    until ch=' ';

    read(ch);

    repeat

    d1:=d1*10+ord(ch)-48;

    read(ch);

    until ch=' ';

    read(ch);

    repeat

    d2:=d2*10+ord(ch)-48;

    read(ch);

    until ch=' ';

    read(d3);

    read(ch);

    read(d4);

    read(ch);

    read(ch);

    repeat

    d5:=d5*10+ord(ch)-48;

    read(ch);

    until ch=chr(13);

    readln;

    if (d1>80) and (d5>=1) then s[i].scholar:=s[i].scholar+8000;

    if (d1>85) and (d2>80) then s[i].scholar:=s[i].scholar+4000;

    if d1>90 then s[i].scholar:=s[i].scholar+2000;

    if (d1>85) and (d4='Y') then s[i].scholar:=s[i].scholar+1000;

    if (d2>80) and (d3='Y') then s[i].scholar:=s[i].scholar+850;

    if s[i].scholar>maxscholar then

    begin

    maxname:=s[i].name;

    maxscholar:=s[i].scholar;

    end;

    total:=total+s[i].scholar;

    end;

    writeln(maxname);

    writeln(maxscholar);

    writeln(total);

    end.

  • 0
    @ 2008-11-27 14:23:20

    program jxj;

    type

    student=record

      xm:string;

      mark1,mark2,ly:longint;

      s,gb,xb:char;

    end;

    sj=array[1..100] of student;

    var

    ts,best,bxx,i,n:integer;

    tsj:sj;

    mark:array[1..100] of integer;

    begin

    read(n);

    for i:=1 to n do

      begin

      with tsj[i] do

       begin

        repeat

         read(s);

         if s=' ' then break;

         xm:=xm+s;

        until 11;

       end;

       read(tsj[i].mark1);

       read(tsj[i].mark2);

       read(tsj[i].gb);

       read(tsj[i].xb);

       read(ly);

       mark[i]:=0;

       best:=0;

       if (mark1>80) and (ly>=1) then mark[i]:=mark[i]+8000;

       if (mark1>85) and (mark2>80) then mark[i]:=mark[i]+4000;

       if mark1>90 then mark[i]:=mark[i]+2000;

       if (mark1>85) and (xb='Y') then mark[i]:=mark[i]+1000;

       if (mark2>80) and (gb='Y') then mark[i]:=mark[i]+850;

       if mark[i]>best then

       begin

        best:=mark[i];

        bxx:=i;

       end;

       ts:=ts+mark[i];

      end;

    write(tsj[bxx].xm);

    writeln(best);

    writeln(ts)

    end.

  • 0
    @ 2008-11-23 19:40:07

    #include

    int main(){

    int i,j,n,qm,py,lw,prize,max=0;

    long total=0;

    char a[20],name[20],xb,gb;

    scanf("%d",&n);

    for(i=1;i80)&&(lw>0)) prize+=8000;

    if((qm>85)&&(py>80)) prize+=4000;

    if(qm>90) prize+=2000;

    if((qm>85)&&(xb=='Y')) prize+=1000;

    if((py>80)&&(gb=='Y')) prize+=850;

    total+=prize;

    if(prize>max){

    max=prize;

    for(j=0;j

  • 0
    @ 2008-11-23 16:11:29

    #include

    using namespace std;

    int n,tot;

    struct one

    {

    char name[20];

    int qimo;

    int pinyi;

    char T;

    char R;

    int art;

    int money;

    }a[100];

    int cmp(const void *a,const void *b)

    {

    struct one*aa=(struct one*)a;

    struct one*bb=(struct one*)b;

    return (bb->money>aa->money)?1:-1;

    }

    int main()

    {

    cin>>n;

    for(int i=0;i>a[i].name>>a[i].qimo>>a[i].pinyi>>a[i].T>>a[i].R>>a[i].art;

    if(a[i].qimo>80&&a[i].art>=1)a[i].money+=8000;

    if(a[i].qimo>85&&a[i].pinyi>80)a[i].money+=4000;

    if(a[i].qimo>90)a[i].money+=2000;

    if(a[i].qimo>85&&a[i].R=='Y')a[i].money+=1000;

    if(a[i].pinyi>80&&a[i].T=='Y')a[i].money+=850;

    tot+=a[i].money; }

    qsort(a,n,sizeof(a[0]),cmp);

    cout

  • 0
    @ 2008-11-23 15:23:30

    program jxj;

    type

    student=record

      xm:string;

      mark1,mark2,ly:longint;

      s,gb,xb:char;

    end;

    sj=array[1..100] of student;

    var

    ts,best,bxx,i,n:integer;

    tsj:sj;

    mark:array[1..100] of integer;

    begin

    read(n);

    for i:=1 to n do

      begin

      with tsj[i] do

       begin

        repeat

         read(s);

         if s=' ' then break;

         xm:=xm+s;

        until 11;

       end;

       read(tsj[i].mark1);

       read(tsj[i].mark2);

       read(tsj[i].gb);

       read(tsj[i].xb);

       read(ly);

       mark[i]:=0;

       best:=0;

       if (mark1>80) and (ly>=1) then mark[i]:=mark[i]+8000;

       if (mark1>85) and (mark2>80) then mark[i]:=mark[i]+4000;

       if mark1>90 then mark[i]:=mark[i]+2000;

       if (mark1>85) and (xb='Y') then mark[i]:=mark[i]+1000;

       if (mark2>80) and (gb='Y') then mark[i]:=mark[i]+850;

       if mark[i]>best then

       begin

        best:=mark[i];

        bxx:=i;

       end;

       ts:=ts+mark[i];

      end;

    write(tsj[bxx].xm);

    writeln(best);

    writeln(ts)

    end.

  • 0
    @ 2008-11-22 20:02:30

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    简单,但是麻烦。

  • 0
    @ 2008-11-18 17:08:48

    program kji; 编程

    var

    s,lw,qm,bj,max,maxname:integer;

    gb,xb:char;

    begin

    s:=0; maxname:='';

    for i:=1 to n do

    max:=0; tatol:=0;

    read(s);

    if lw>0 then s:=s+8000;

    if (qm>85)and(bj>80) then s:=s+4000;

    if (qm>90) then s:=s+2000;

    if (xb=y)and(qm>85)then s:=s+1000;

    if (bj>80)and(gb=y) then s:=s+850;

    if s>max then max:=s;

    tatol:=tatol+max;

    writeln(maxname);

    writeln(max);

    writeln(tatol);

    end.

  • 0
    @ 2008-11-14 02:10:00

    program jxj;

    type

    student=record

    xm:string;

    mark1,mark2,ly:longint;

    s,gb,xb:char;

    end;

    sj=array[1..100] of student;

    var

    ts,best,bxx,i,n:integer;

    tsj:sj;

    mark:array[1..100] of integer;

    begin

    read(n);

    for i:=1 to n do

    begin

    with tsj[i] do

    begin

    repeat

    read(s);

    if s=' ' then break;

    xm:=xm+s;

    until 11;

    end;

    read(tsj[i].mark1);

    read(tsj[i].mark2);

    read(tsj[i].gb);

    read(tsj[i].xb);

    read(ly);

    mark[i]:=0;

    best:=0;

    if (mark1>80) and (ly>=1) then mark[i]:=mark[i]+8000;

    if (mark1>85) and (mark2>80) then mark[i]:=mark[i]+4000;

    if mark1>90 then mark[i]:=mark[i]+2000;

    if (mark1>85) and (xb='Y') then mark[i]:=mark[i]+1000;

    if (mark2>80) and (gb='Y') then mark[i]:=mark[i]+850;

    if mark[i]>best then

    begin

    best:=mark[i];

    bxx:=i;

    end;

    ts:=ts+mark[i];

    end;

    write(tsj[bxx].xm);

    writeln(best);

    writeln(ts)

    end.

  • 0
    @ 2008-11-13 22:27:21

    终于知道什么叫做郁闷,试了九次才通过。

    只是一个很小的错误——读论文数时本来应该是“readln”,我写了“read”

    大家不要重蹈覆辙啊!!

  • 0
    @ 2008-11-13 11:42:32

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    program scholar;

    var

    s,ansname,name1:ansistring;

    i,j,n,class1,art,term,sum,ans,len,now,orz,code:longint;

    west,gov:boolean;

    begin

    readln(n);

    for orz:=1 to n do

    begin

    readln(s);

    len:=length(s);

    term:=0;

    class1:=0;

    west:=false;

    gov:=false;

    art:=0;

    now:=0;

    i:=1;

    while s[i]' ' do inc(i);

    name1:=copy(s,1,i-1);

    now:=0;

    inc(i);

    j:=i;

    while s[j]' ' do inc(j);

    val(copy(s,i,j-i),term,code);

    i:=j+1;

    j:=i;

    while s[j]' ' do inc(j);

    val(copy(s,i,j-i),class1,code);

    inc(j);

    if s[j]='Y' then gov:=true;

    inc(j,2);

    if s[j]='Y' then west:=true;

    inc(j,2);

    val(copy(s,j,len-j+1),art,code);

    if term>80 then if art>0 then inc(now,8000);

    if term>85 then if class1>80 then inc(now,4000);

    if term>90 then inc(now,2000);

    if west then if term>85 then inc(now,1000);

    if gov then if class1>80 then inc(now,850);

    if now>ans then begin ansname:=name1;ans:=now;end;

    inc(sum,now);

    end;

    writeln(ansname);

    writeln(ans);

    writeln(sum);

    end.

  • 0
    @ 2008-11-13 09:05:42

    注意读入时各种数据类型的分隔符

    数为空格

    字符串为行

    字符就不用说了~

  • 0
    @ 2008-11-11 21:26:23

    "_"初一的程序:

    var name,maxname,s:string;

    pd1,pd2:char;

    sum,total:longint;

    fen,ping,n,max,pian,i:integer;

    function work(fen,ping:integer;pd1,pd2:char; pian:integer):longint;

    begin

    work:=0;

    if (fen>80) and (pian>0) then work:=work+8000;

    if (fen>85) and (ping>80) then work:=work+4000;

    if fen>90 then work:=work+2000;

    if (fen>85) and (pd2='Y') then work:=work+1000;

    if (ping>80) and (pd1='Y') then work:=work+850;

    end;

    procedure work(s:string);

    var pos1,d:integer;

    sub:string;

    begin

    pos1:=pos(' ',s);

    name:=copy(s,1,pos1-1);

    delete(s,1,pos1);

    pos1:=pos(' ',s);

    sub:=copy(s,1,pos1-1);

    val(sub,fen,d);

    delete(s,1,pos1);

    pos1:=pos(' ',s);

    sub:=copy(s,1,pos1-1);

    val(sub,ping,d);

    delete(s,1,pos1);

    pd1:=s[1];

    pd2:=s[3];

    delete(s,1,3);

    val(s,pian,d);

    end;

    begin

    readln(n);

    for i:=1 to n do

    begin

    readln(s);

    work(s);

    sum:=work(fen,ping,pd1,pd2,pian);

    if sum>max then

    begin

    max:=sum;

    maxname:=name;

    end;

    total:=total+sum;

    end;

    writeln(maxname);

    writeln(max);

    writeln(total);

    end.

  • 0
    @ 2008-11-10 22:09:57

    此题不可做!

  • 0
    @ 2008-11-09 13:10:40

    依次读入名字等,读一次判断一次

  • 0
    @ 2008-11-09 11:46:17

    var

    s,lw,qm,bj,max,maxname:integer;

    gb,xb:char;

    begin

    s:=0; maxname:='';

    for i:=1 to n do

    max:=0; tatol:=0;

    read(s);

    if lw>0 then s:=s+8000;

    if (qm>85)and(bj>80) then s:=s+4000;

    if (qm>90) then s:=s+2000;

    if (xb=y)and(qm>85)then s:=s+1000;

    if (bj>80)and(gb=y) then s:=s+850;

    if s>max then max:=s;

    tatol:=tatol+max;

    writeln(maxname);

    writeln(max);

    writeln(tatol);

    end.

  • 0
    @ 2008-11-08 11:12:07

    var

    a,mon,mo,n,i,most:longint;

    k:char;

    na:array[1..101] of string;

    fi,cl,ar: longint;

    ad,xb:char;

    begin

    readln(a );

    for i:=1 to a do

    begin

    mo:=0;

    while not eoln do

    begin

    read(k);

    if k' ' then na[i]:=na[i]+k

    else begin

    read (fi) ;

    read(cl);

    k:=' ';

    while k=' ' do

    read(k);

    ad:=k;

    k:=' ';

    while k=' ' do

    read(k);

    xb:=k;

    read(ar);

    end;

    end;

    readln;

    if (fi>80) and (ar>=1) then mo:=mo+8000;

    if (fi>85) and (cl>80) then mo:=mo+4000;

    if fi>90 then mo:=mo+2000;

    if (fi>85) and (xb='Y') then mo:=mo+1000;

    if (cl>80) and (ad='Y') then mo:=mo+850;

    if mo>most then begin most:=mo ; n:=i; end;

    mon:=mon+mo;

    end;

    writeln(na[n]);

    writeln(most);

    writeln(mon);

    end.

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
39260
已通过
12791
通过率
33%
被复制
130
上传者