mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
parent
7d40413c6c
commit
3e27ad954d
22
VIJOS/1291_guoqianli.pas
Normal file
22
VIJOS/1291_guoqianli.pas
Normal file
|
@ -0,0 +1,22 @@
|
|||
var a,b:array[1..10000]of longint;
|
||||
c,d:array[1..10000]of boolean;
|
||||
n,m,i,j,k,max:longint;
|
||||
begin
|
||||
max:=0;
|
||||
fillchar(c,sizeof(c),true);
|
||||
d:=c;
|
||||
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 n-1 do
|
||||
for j:=i+1 to n do
|
||||
if a[i]<a[j] then begin k:=a[i]; a[i]:=a[j]; a[j]:=k; end; 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 n do for j:=1 to m do if b[j]>0 then
|
||||
if (a[i]>b[j])and(c[i])and(d[j])then
|
||||
begin
|
||||
inc(max);
|
||||
c[i]:=false;
|
||||
d[j]:=false;
|
||||
break;
|
||||
end;
|
||||
writeln(m-max);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user