帮忙纠个错,十个测试点错了三个
var a,b,c,d:array[1..8]of longint;
i,j,k,l,n,m,t,s:longint;
begin
for i:=1 to 7 do
begin
readln(a[i],b[i]);
if a[i]+b[i]>8 then c[i]:=a[i]+b[i];
end;
for i:=1 to 7 do d[i]:=i;
for i:=1 to 6 do
for j:=i+1 to 7 do
begin
if c[i]<c[j] then begin t:=c[i];
c[i]:=c[j];
c[j]:=t;
s:=d[i];
d[i]:=d[j];
d[j]:=s;
end;
end;
if c[1]=c[2] then if d[1]<d[2] then writeln(d[1])
else writeln(d[2]);
end.
var a,b,c,d:array[1..8]of longint;
i,j,k,l,n,m,t,s:longint;
begin
for i:=1 to 7 do
begin
readln(a[i],b[i]);
if a[i]+b[i]>8 then c[i]:=a[i]+b[i];
end;
for i:=1 to 7 do d[i]:=i;
for i:=1 to 6 do
for j:=i+1 to 7 do
begin
if c[i]<c[j] then begin t:=c[i];
c[i]:=c[j];
c[j]:=t;
s:=d[i];
d[i]:=d[j];
d[j]:=s;
end;
end;
if c[1]=c[2] then if d[1]<d[2] then writeln(d[1])
else writeln(d[2]);
end.