- 问答
- 2012-11-08 14:38:10 @
P1257
水王争霸
var
i,j,n:longint;
a:array[0..1001,0..2] of string;
procedure jiaohuang(i,j:longint);
begin
a[0,0]:=a;
a:=a[j,2];
a[j,2]:=a[0,0];
a[0,0]:=a;
a:=a[j,1];
a[j,1]:=a[0,0];
end;
procedure max(x,y:longint);
var
i:longint;
begin
if length(a[x,2])length(a[y,2]) then exit else
begin
for i:=1 to length(a[x,2]) do begin
if a[x,2,i]a[y,2,i] then exit;
end;
end;
end;
begin
readln(n);
for i:=1 to n do begin
readln(a);
readln(a);
end;
for i:=1 to n-1 do begin
for j:=i+1 to n do begin
max(i,j);
end;
end;
for i:=1 to n do writeln(a);
end.
只对第一个点、为什么啊..
2 条评论
-
bill1996 LV 7 @ 2012-11-08 14:38:11
若几个ID的发贴数相同,则按照ID的字典顺序先后排列。
-
2012-11-08 14:35:30@
帖子数相同没有考虑
- 1