提交时间:2019-11-30 09:24:38

运行 ID: 2566

#include<iostream> using namespace std; int main(){ int ey,uy,looking_this_mengnalisa=0; int youku[111],kugou[222]; cin>>ey>>uy; for(int E=1;E<=ey;E++){ cin>>youku[E]; } for(int A=1;A<=uy;A++){ cin>>kugou[A]; } for(int x=1;x<=ey;x++){ for(int y=1;y<=ey-1;y++){ if(youku[y]>youku[y+1]){ int suy; suy=youku[y]; youku[y]=youku[y+1]; youku[y+1]=suy; } } } for(int x=1;x<=uy;x++){ for(int y=1;y<=uy-1;y++){ if(kugou[y]>kugou[y+1]){ int suy; suy=kugou[y]; kugou[y]=kugou[y+1]; kugou[y+1]=suy; } } } int PRG_maker_VX=1; for(int tamedo=1;tamedo<=uy;tamedo++){ int PRG_maker_VA=0; for(int PRG_maker_VX_ace=PRG_maker_VX;PRG_maker_VX_ace<=ey;PRG_maker_VX_ace++){ if(PRG_maker_VA==2){ break; } if(kugou[tamedo]>=youku[PRG_maker_VX_ace]){ looking_this_mengnalisa++; PRG_maker_VX++; PRG_maker_VA++; } } } printf("%d",looking_this_mengnalisa); return 0; }