diff --git a/VIJOS/1291_guoqianli.pas b/VIJOS/1291_guoqianli.pas new file mode 100644 index 0000000..7a888ba --- /dev/null +++ b/VIJOS/1291_guoqianli.pas @@ -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]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.