This commit is contained in:
Zengtudor 2024-11-21 09:49:25 +08:00
parent 149e6c4249
commit c11cc27036
9 changed files with 3000045 additions and 0 deletions

32
src/20241121/U504523.cpp Normal file
View File

@ -0,0 +1,32 @@
#include <bits/stdc++.h>
using namespace std;
using ll =int64_t;
const ll maxn{ll(1e6+5)};
ll a[maxn],d[maxn];
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
for(int i=0;i<n;i++){
cin >> a[i] >> d[i];
}
sort(a, a+n);
sort(d,d+n);
int j = 0;
int k = 0;
for(int i=0;i<n;i++){
if(a[i] > d[j]){
k++;
j++;
if(j == n){
break;
}
}
}
cout << (n - k) <<'\n';
}

View File

@ -0,0 +1 @@
4

View File

@ -0,0 +1,6 @@
5
6 7
5 8
6 9
3 6
3 4

View File

@ -0,0 +1 @@
750215

1000001
src/20241121/card/card2.in Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
138

1000001
src/20241121/card/card3.in Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
500739

1000001
src/20241121/card/card4.in Normal file

File diff suppressed because it is too large Load Diff