#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x>N>>A; FOR(i,A) cin>>B[i]; cin>>C; FOR(i,C) cin>>D[i]; sort(B,B+A); reverse(B,B+A); sort(D,D+C); for(i=A;iD[y]) { ret++; D[y]=1010; } } cout<