- 陶陶抢苹果
- 2012-10-13 21:04:16 @
var
i,j,m,n,temp1,temp2,x:longint;
a,b1,b2,c:array[1..100000] of longint;
begin
readln(n,m);
for i:=1 to n do
read(a[i]);
for i:=1 to m do
begin
read(b2[i]);
b1[i]:=b2[i];
end;
for i:=n-1 downto 1 do
for j:=1 to i do
if a[j]
2 条评论
-
shude111 LV 5 @ 2012-10-16 21:13:54
直接快排啊
-
2012-10-14 09:24:22@
好像是真超时了
你的复杂度是O(n^2)吧,n有10^5呢。
- 1