#include #define REP(i,n,N) for(int i=(n);i<(int) N;i++) #define RREP(i,n,N) for(int i=N-1;i>=(int) n;i--) #define p(s) cout<<(s)<> v1; cin>>Nw;; REP(i,0,Nw){ int a; cin>>a; v1.push_back({a,0}); } cin>>Nb; REP(i,0,Nb){ int a; cin>>a; v1.push_back({a,1}); } sort(v1.begin(),v1.end()); int now=1,mn=50; int w=0; RREP(i,0,v1.size()){ if(1-now==v1[i].S&&mn>v1[i].F){ now=1-now; mn=v1[i].F; w++; } } int b=0; now=1;mn=50; RREP(i,0,v1.size()){ if(1-now==v1[i].S&&mn>v1[i].F){ now=1-now; mn=v1[i].F; b++; } } p(max(w,b)); return 0; }