191 条题解

  • 0
    @ 2009-07-26 23:58:28

    ......没注意0,Wa了3次,rp---|-

  • 0
    @ 2009-07-26 19:31:25

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    貌似没什么好炫耀的

    不过还是发上来自己开心一下

    娃哈哈哈哈哈哈哈

  • 0
    @ 2009-07-25 20:34:51

    等的越久,我的心down得越低。。。

  • 0
    @ 2009-07-20 23:26:02

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    var n,i,r,f,k,j,w:longint; qian,qian1:array[0..20]of longint;

    st:array[0..20]of string; st2:string;

    begin

    readln(n);

    for i:=1 to n do readln(st[i]);

    for i:=1 to n do

    begin

    readln(st2);

    for j:=1 to n do if st[j]=st2 then w:=j;

    readln(qian[w],r);

    if r0 then f:=qian[w] div r;

    for j:=1 to r do

    begin

    readln(st2);

    for k:=1 to n do if st[k]=st2 then qian1[k]:=qian1[k]+f;

    end;

    qian[w]:=-f*r;

    end;

    for i:=1 to n do writeln(st[i],' ',qian[i]+qian1[i]);

    end.

  • 0
    @ 2009-07-19 19:11:05

    别乱报答案啊

  • 0
    @ 2009-07-18 23:12:24

    var a,c,d,e,pay,num:integer;

    b:array[1..10] of record

    named:string;

    money:integer;

    end;

    tmp:string;

    begin

    readln(a);

    for c:=1 to a do

    begin

    readln(b[c].named);

    b[c].money:=0;

    end;

    for c:=1 to a do

    begin

    readln(tmp);

    readln(pay,num);

    if num0 then

    for d:=1 to a do

    if b[d].named=tmp then

    b[d].money:=b[d].money-(pay div num)*num;

    for d:=1 to num do

    begin

    readln(tmp);

    for e:=1 to a do

    if b[e].named=tmp then

    b[e].money:=b[e].money+pay div num;

    end;

    end;

    for c:=1 to a do

    writeln(b[c].named,' ',b[c].money);

    end.

  • 0
    @ 2009-07-17 14:07:54

    program das;

    var n, i, j, k, t, p, q: longint;

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

    a, b: array[1..10] of longint;

    s: string;

    begin

    readln(n);

    for i := 1 to n do readln(name[i]);

    for i := 1 to n do

    begin

    readln(s);

    j := 1;

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

    readln(a[j],t);

    if t = 0 then

    begin

    b[j] := b[j] + a[j];

    a[j] := 0;

    end

    else

    begin

    p := a[j] div t;

    q := a[j] mod t;

    inc(b[j],q);

    for k := 1 to t do

    begin

    readln(s);

    j := 1 ;

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

    inc(b[j],p);

    end;

    end;

    end;

    for i := 1 to n do a[i] := b[i]-a[i];

    for i := 1 to n do writeln(name[i],' ',a[i]);

    end.

    农夫山泉

  • 0
    @ 2009-07-03 11:59:54

    var np,i,j,num,k,sum,m,n:integer;

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

    a,b:array[1..10] of longint;

    nam,tnam:string;

    begin

    readln(np);

    for i:= 1 to np do readln(na[i]);

    for i:= 1 to np do

    begin

    readln(nam);

    for j:= 1 to np do

    if na[j] = nam then num:=j;

    readln(sum,k);

    if k = 0 then a[num]:=0

    else a[num]:= sum - sum mod k ;

    for j:= 1 to k do

    begin

    readln(tnam);

    for m:= 1 to np do

    if na[m] = tnam then

    b[m]:= b[m] + sum div k ;

    end;

    end;

    for i:= 1 to np do writeln(na[i],' ',b[i]-a[i]);

    end.

  • 0
    @ 2009-06-24 15:10:51

    为什么我才30?说是名字打错

    郁闷ing...

  • 0
    @ 2009-05-16 23:52:29

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    #include

    #include

    int main()

    {

    int i,j,ng,np,present,togive,gp,rp;

    char names[10][15],tname[15];

    int given[10],received[10];

    scanf("%d",&np);

    for(i=0;i

  • 0
    @ 2009-05-08 23:36:01

    这道题还算他有点良心 特殊情况都在sample中出了出来

    样例过了就没什么问题了

    不像某些没人品的题 样例给的太有迷惑性!

  • 0
    @ 2009-05-07 12:50:30

    usaco的程序交上去后在哪里看

  • 0
    @ 2009-05-05 22:04:11

    一定要注意除数不能为0啊!!

    要不然会被这种基础题给害了!!

    虽然自己是垃圾

    但是这种垃圾错误实在不该犯啊~!

  • 0
    @ 2009-05-03 13:38:54

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

  • 0
    @ 2009-05-03 11:17:09

    Hash

  • 0
    @ 2009-04-29 16:56:54

    type

    gift=

    record

    ans,money,ngi:integer;

    ng:array [1..10] of string;

    n:string;

    end;

    var

    np,i,j,k,m:integer;

    s:array [1..10] of gift;

    str:string;

    begin

    for i:=1 to 10 do s[i].ans:=0;

    readln(np);

    for i:=1 to np do readln(s[i].n);

    for i:=1 to np do

    begin

    readln(str);

    for j:=1 to np do if s[j].n=str then m:=j;

    readln(s[m].money,s[m].ngi);

    for j:=1 to s[m].ngi do readln(s[m].ng[j]);

    end;

    for i:=1 to np do if s[i].ngi>0 then

    begin

    s[i].ans:=s[i].ans-s[i].money div s[i].ngi*s[i].ngi;

    for j:=1 to s[i].ngi do for k:=1 to np do if s[i].ng[j]=s[k].n then s[k].ans:=s[k].ans+s[i].money div s[i].ngi;

    end;

    for i:=1 to np do writeln(s[i].n,' ',s[i].ans);

    begin end;

    end.

  • 0
    @ 2009-04-22 13:17:37

    type

    gift=

    record

    ans,money,ngi:integer;

    ng:array [1..10] of string;

    n:string;

    end;

    var

    np,i,j,k,m:integer;

    s:array [1..10] of gift;

    str:string;

    begin

    for i:=1 to 10 do s[i].ans:=0;

    readln(np);

    for i:=1 to np do readln(s[i].n);

    for i:=1 to np do

    begin

    readln(str);

    for j:=1 to np do if s[j].n=str then m:=j;

    readln(s[m].money,s[m].ngi);

    for j:=1 to s[m].ngi do readln(s[m].ng[j]);

    end;

    for i:=1 to np do if s[i].ngi>0 then

    begin

    s[i].ans:=s[i].ans-s[i].money div s[i].ngi*s[i].ngi;

    for j:=1 to s[i].ngi do for k:=1 to np do if s[i].ng[j]=s[k].n then s[k].ans:=s[k].ans+s[i].money div s[i].ngi;

    end;

    for i:=1 to np do writeln(s[i].n,' ',s[i].ans);

    end.

  • 0
    @ 2009-03-29 18:48:00

    我是第3888人通过的~~~~

  • 0
    @ 2009-02-07 13:28:14

    var

    t:string;

    a:array[1..10]of record

               name:string;

               b:array[1..9]of string;

               s,get,money,ngi:longint;

             end;

    np,i,j,k:longint;

    begin

    readln(np);

    for i:=1 to np do readln(a[i].name);

    for i:=1 to np do

    begin

      readln(t);

      for j:=1 to np do if a[j].name=t then break;

      readln(a[j].money,a[j].ngi);

      if a[j].ngi0 then

      begin

       a[j].money:=a[j].money-(a[j].money-((a[j].money div a[j].ngi)*a[j].ngi));

       for k:=1 to a[j].ngi do

        readln(a[j].b[k]);

      end;

    end;

    for i:=1 to np do

      for j:=1 to a[i].ngi do

       for k:=1 to np do

        if (a[k].name=a[i].b[j]) then

         a[k].get:=a[k].get+(a[i].money div a[i].ngi);

    for i:=1 to np do

    begin

      a[i].s:=(a[i].get-a[i].money);

      write(a[i].name,' ');

      writeln(a[i].s);

    end;

    end.

  • 0
    @ 2009-02-06 17:44:53

    #include

    int n;

    struct v

    {

    char name[20];

    int money;

    }line[1000];

    char s[20];

    int search ()

    {

    int i,j,f;

    for (i=1; i='a') && (s[j]='A')&&(s[j]

信息

ID
1035
难度
2
分类
模拟 点击显示
标签
(无)
递交数
5216
已通过
2897
通过率
56%
被复制
18
上传者