- 苹果摘陶陶
- 2015-03-01 09:05:21 @
program dsa;
var
a,b:array[1..2000]of longint;
n,m,i,j,x,y,k,o,p:longint;
begin
//assign(input,'1.txt');
//reset(input);
readln(n,m);
for i:=1 to n do readln(a[i]);
for i:=1 to m do readln(b[i]);
for i:=1 to m-1 do
for j:=i+1 to m do
if b[i]<b[j] then
begin
k:=b[i]; b[i]:=b[j]; b[j]:=k;
end;
for i:=1 to m do
for j:=1 to n do
begin
if (a[j]>b[i])and(b[i]<>o) then
begin
a[j]:=0;
inc(o);
break;
end;
end;
p:=m-o;
writeln(p);
end.
0 条评论
目前还没有评论...