#include #include #include using namespace std; int main(){ int N, M; cin >> N; vector>Members(N); for(int i=0; i> ai >> bi; Members[i].first=ai; Members[i].second=bi; } cin >> M; vector>Mentaiko(M); for(int i=0; i> xi >> yi; Mentaiko[i].first=xi; Mentaiko[i].second=yi; } int maxcount=0; for(int j=0; j=Mentaiko[j].first && Members[i].second<=Mentaiko[j].second){ tmpcount++; } } maxcount = maxcount < tmpcount ? tmpcount : maxcount; } cout << maxcount; return 0; }