为什么老出错,牛进

program john;

var a:array[1..7,1..2] of integer; b:array[1..7] of integer;

temp,temp2,w,q,l,j,u,i:integer;c:array[1..7]of integer;

begin

for i:=1 to 7 do

for j:=1 to 2 do

read(a);

for l:=1 to 7 do

b[l]:=a+a;

for l:=1 to 6 do

for q:=1 to 7-l do

if b[q]8 then

for q:=2 to 7 do

if b[1]=b[q] then

for i:= 1 to 7 do

for j:= 1 to 2 do

if(a+a=b[i])and(a+a=b[q]) then

begin

for u:=1 to 7 do

c:=i;

for u:=1 to 6 do

for w:=1 to 7-u do

if c[w]>c[w+1] then

begin

temp2:=c[w];

c[w]:=c[w+1];

c[w+1]:=temp2;

end;

end;

writeln(c[1]);

if (b[1]=8)or(b[1]

8 条评论

  • @ 2016-08-08 13:22:05

    var
    s,i,X,y,w,max:longint;
    begin
    for i:=1 to 7 do begin
    readln(x,y);
    if (x+y>8)and(x+y>max) then begin w:=i;max:=x+y;end;
    end;
    writeln(w);
    end.

  • @ 2014-11-01 09:43:26

    var a:array[1..7,1..7]of longint;
    b:array[1..7,1..7]of longint;
    i,j,max,maxn:longint;
    c,d:array[1..7]of longint;
    begin
    for i:=1 to 7 do readln(a[1,i],a[2,i]);
    for i:=1 to 7 do
    begin
    c[i]:=(a[1,i]+a[2,i]);
    if (c[i]>8) then d[i]:=c[i];
    end;
    for i:=7 downto 2 do if(d[i-1]<=d[i]) then begin
    maxn:=d[i];

    if max<maxn then max:=i;
    end;
    writeln(max);
    end.

  • @ 2013-10-16 15:48:23

    var
    i,j,k,l,n,m:longint;
    a,b:array[1..7]of longint;
    begin
    for i:=1 to 7 do
    readln(a[i],b[i]);
    for i:=1 to 7 do
    if a[i]+b[i]>8 then begin
    writeln(i);
    halt;
    end;
    writeln('0');
    end.

  • @ 2013-04-29 16:20:49

    var a:array[1..7,1..2]of integer;
    b:array[1..7]of integer;
    i,j:integer;
    begin
    for i:=1 to 7 do
    readln(a[i,1],a[i,2]);
    for i:=1 to 7 do
    begin
    b[i]:=a[i,1]+a[i,2];
    end;
    for i:=1 to 7 do
    if b[i]>8 then
    begin
    j:=i;
    break;
    end
    else j:=0;
    writeln(j);
    readln;
    readln
    end.

  • @ 2009-10-11 21:33:05

    2l好简洁。。!

  • @ 2009-09-05 16:54:48

    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

  • @ 2009-09-05 15:56:52

    顶楼上- -

    没有LZ想得这么惊囧吧- -

  • @ 2009-09-05 14:21:00

    自己看

    program dsa;

    var ans,i,a,b,s,max:integer;

    begin

    ans:=0;

    max:=0;

    for i:=1 to 7 do

    begin

    read(a,b);

    s:=a+b;

    if (s>8) and (s>max) then

    begin

    max:=s;

    ans:=i;

    end;

    end;

    write(ans);

    end.

  • 1

信息

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