0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 15:16:28 +00:00

#1562. 【2022.9.19 NOIP 模拟赛】录像

https://sjzezoj.com/submission/57201
This commit is contained in:
Baoshuo Ren 2022-09-20 20:20:55 +08:00
parent 34179a97a2
commit 6f733038c4
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
64 changed files with 233 additions and 0 deletions

44
S2OJ/1562/1562.cpp Normal file
View File

@ -0,0 +1,44 @@
#include <iostream>
#include <algorithm>
#include <set>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 1e5 + 5;
int n, k, ans;
std::pair<int, int> a[N];
std::multiset<int> set;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> k;
for (int i = 1; i <= n; i++) {
cin >> a[i].first >> a[i].second;
}
std::sort(a + 1, a + 1 + n, [&](const std::pair<int, int> &a, const std::pair<int, int> &b) {
return a.second < b.second;
});
for (int i = 1; i <= k; i++) set.insert(0);
for (int i = 1; i <= n; i++) {
auto it = set.upper_bound(a[i].first);
if (it != set.begin()) {
set.erase(--it);
set.insert(a[i].second);
ans++;
}
}
cout << ans << endl;
return 0;
}

BIN
S2OJ/1562/data/problem.conf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv11.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv11.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv12.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv12.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv13.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv13.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv14.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv14.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv15.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv15.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv16.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv16.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv17.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv17.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv18.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv18.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv19.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv19.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv20.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv20.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv21.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv21.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv22.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv22.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv23.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv23.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv24.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv24.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv25.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv25.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv26.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv26.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv27.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv27.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv28.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv28.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv29.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv29.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv30.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv30.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv31.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv31.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1562/data/tv9.out (Stored with Git LFS) Normal file

Binary file not shown.