#include <bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define fs first
#define sc second
#define _all(T) T.begin(),T.end()
const int mxn = 4e5+10;
pii arr[mxn],brr[mxn];
vector<pii> v;
int N;
int cnt[mxn];
int main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>N;
int ans = N;
for(int i = 0;i<N;i++)cin>>arr[i].fs>>arr[i].sc,v.push_back(pii(arr[i].sc,-arr[i].fs));
for(int i = 0;i<N;i++)cin>>brr[i].fs>>brr[i].sc,v.push_back(pii(brr[i].sc,brr[i].fs));
sort(_all(v));
for(auto &i:v){
if(i.sc<0){
i.sc = -i.sc;
cnt[i.sc]++;
}
else{
if(cnt[i.sc]){
cnt[i.sc]--;
ans--;
}
}
}
cout<<ans<<'\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |