1 条题解
-
0HLBhahaqiu LV 8 MOD @ 2020-08-28 16:54:52
#include<iostream>
#include<algorithm>
using namespace std;
int n,m,ans;
int a[2005],t[2005];
bool bj[2005];
int main()
{
cin>>n>>m;
ans=m;
for(int i=1;i<=n;++i)
cin>>a[i];
for(int i=1;i<=m;++i)
cin>>t[i];
sort(t+1,t+m+1);
for(int i=1;i<=n;++i)
for(int j=m;j>=1;--j)
if((a[i]>t[j])&&(bj[j]==0)&&(t[j]!=0))
{
bj[j]=1;
ans--;
break;
}
cout<<ans;
return 0;
}
//不过版主吃屎
- 1