332 条题解

  • 0
    @ 2009-03-12 12:02:10

    var

    a,b,i,m,n:integer;

    begin

    m:=0;

    n:=0;

    for i:=1 to 7 do

    begin

    readln(a,b);

    if a+b>8 then

    begin

    if a+b>m then

    begin

    m:=a+b;

    n:=i;

    end;

    end;

    end;

    writeln(n);

    end.

  • 0
    @ 2009-02-27 12:55:45

    var f,t,t1,a,b,i,j:integer;

    c,d,s:array[1..10] of integer;

    begin

    for i:=1 to 7 do begin

    readln (a,b);

    s[i]:=a+b;

    end;

    for i:=1 to 7 do begin

    if s[i]>8 then begin f:=f+1;c[f]:=s[i];d[f]:=i;end;

    end;

    for i:=1 to f do begin

    for j:=1 to f do begin

    if c[i]>c[j]then begin t:=c[i];c[i]:=c[j];c[j]:=t;t1:=d[i];d[i]:=d[j];d[j]:=t1;end;

    end;

    end;

    for i:=2 to 7 do begin

    if c[1]=c[i] then begin if d[1]>d[i] then d[1]:=d[i];end;

    end;

    writeln (d[1]);

    end.

  • 0
    @ 2009-02-20 21:58:51

    var

    a,b,max:integer;

    i,j,k:integer;

    begin

    max:=8;

    for i:=1 to 7 do

    begin

    readln(a,b);

    j:=a+b;

    if a+b>max then

    begin

    max:=j;

    k:=i;

    end;

    end;

    writeln(k);

    writeln;

    end.

  • 0
    @ 2009-02-14 16:26:32

    #include

    int main()

    {

    int x,y,i,max=8,ans;

    for(i=0;imax) {ans=i+1;max=x+y;}

    }

    printf("%d",ans);

    return 0;

    }

  • 0
    @ 2009-02-04 00:01:54

    program sotm;

    var

    a,b,c,d,i,j:integer;

    begin

    d:=0;

    j:=0;

    for i:=1 to 7 do

    begin

    c:=0;

    readln(a,b);

    c:=a+b;

    if (c>8) and (c>d) then

    begin

    d:=c;

    j:=i;

    end;

    end;

    writeln(j);

    end.

  • 0
    @ 2009-01-29 18:59:58

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    var bg:array[1..8]of integer;

    rc:array[1..8,1..3]of integer;

    t,i,j:longint;

    begin

    t:=0;

    for i:=1 to 7 do begin

    readln(rc,rc);

    bg[i]:=rc+rc;

    if (bg[i]>8)and(bg[i]>t)then t:=bg[i];

    end;

    if t=0 then writeln(0)else

    for i:=1 to 7 do if bg[i]=t then begin

    writeln(i);

    break;

    end;

    end.

  • 0
    @ 2009-01-16 16:24:48

    var i,a,b,max,d:longint;

    begin

    for i:=1 to 7 do

    begin

    readln(a,b);

    if a+b>8 then }为第一次准备的(假如第一次就>8了,不然就给i+1次用了)

    if a+b>max then }i>i以前的值说明max就要换班拉~~

    begin

    max:=a+b; }存最大值

    d:=i;   }存最大值的日期 

    end;

    end;

    writeln(d);

    end.

    边输入边计算边比较

    用max存最大值外还要存日期

    输出最大值日期

    OK~~

  • 0
    @ 2009-01-14 22:46:24

    ├ 测试数据 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-01-11 18:18:11

    编译通过...

    ├ 测试数据 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-12-27 17:01:34

    var q,i,j,m,d:integer;

    begin

    m:=0;

    d:=0;

    for q:= 1 to 7 do

    begin

    readln(i,j);

    if i + j > 8 then

    begin

    if i + j > m then

    begin

    m:= i + j;

    d:=q;

    end;

    end;

    end;

    writeln(d);

    end.

  • 0
    @ 2008-12-25 14:39:41

    program laiyuan;

    var

    a:array[1..7,1..2] of longint;

    i,m,n:longint;

    begin

    for i:= 1 to 7 do begin

    readln (a,a);

    a:=a+a;

    if m

  • 0
    @ 2008-12-24 22:28:11

    #include

    int main() {

    int t,t1,t2,d,m,i;

    for(i=1,m=8,d=0;im) d=i,m=t;

    return(printf("%d",d),0);

    }

    直接在提交框打,一次AC...

  • 0
    @ 2008-12-24 18:33:19

    program p1113;

    var i,x,y,t,m:longint;

      a:array[1..7] of longint;

    begin

    for i:=1 to 7 do begin

      readln(x,y);

      a[i]:=x+y;

    end;

    t:=0;

    for i:=1 to 7 do

      if a[i]>t then begin

       m:=i;t:=a[i];

      end;

    writeln(m);

    end.

  • 0
    @ 2008-12-14 00:22:27

    program unhappy;

    var

    n,m:array[1..7] of integer;

    a,b,i:integer;

    f1,f2:text;

    begin

    for i:=1 to 7 do

    read(n[i],m[i]);

    for i:=1 to 7 do

    begin

    if(n[i]+m[i]>8) and (n[i]+m[i]>b)

    then

    begin

    a:=i;

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

    end;

    end;

    end.

  • 0
    @ 2008-12-09 19:10:16

    各位大牛帮忙看看,我怎么会超时?

    #include

    int main(){

    int a[2][7],b,c,d=8,e;

    for(b=0;b

  • 0
    @ 2008-11-29 10:27:12

    var k:longint;

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

    begin

    for k:=1 to 7 do

    read(a[k],b[k]);

    for k:=1 to 7 do

    if a[k]+b[k]>8 then begin writeln(k);break end;

    end.

  • 0
    @ 2008-11-23 15:36:34

    编译通过...

    ├ 测试数据 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-23 15:25:04

    注意!!!输入有误!

    program gu;

    var

    n,m,k,i,o:longint;

    begin

    k:=7;

    for i:=1 to 7 do

    begin

    readln(n,m);

    if n+m>k then

    begin

    k:=n+m;

    o:=i;

    end;

    end;

    writeln(o);

    end.

  • 0
    @ 2008-11-22 21:45:29

    var p,s,sun:array[1..7] of longint;

    i,max,ans:longint;

    begin

    readln(p[i],s[i]);

    sun[i]:=(p[i]+s[i]);

    max:=8;

    for i:=1 to 7 do

    if sun[i] 7 max;

    then begin

    ans:=i;

    max:=sun[i];

    end;

    writeln(ans);

    end

  • 0
    @ 2008-11-12 11:20:05

    为了BS水题,先在文本框里直接敲代码,结果有一个char类型的没有声明,结果wa一次。

    定义了这个变量之后交上去拿了0分,wa第二次。

    我被吓了一跳,到fp里调试,发现没有任何问题,样例过了,自己给了数据也对的,交上去,wa第三次。

    直到看了题解,才发现样例的格式是错误的!!!!!本来可以一次ac的,就是用了一个char来读数据才wa的,BS水题,BS错误数据格式!

信息

ID
1113
难度
2
分类
模拟 点击显示
标签
递交数
11399
已通过
6745
通过率
59%
被复制
39
上传者