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

#1664. 【2022.10.19 联考】纪念品

https://sjzezoj.com/submission/61105
This commit is contained in:
Baoshuo Ren 2022-10-19 19:35:10 +08:00
parent 077fe99d5d
commit 7abd918cdf
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
26 changed files with 117 additions and 0 deletions

42
S2OJ/1664/1664.cpp Normal file
View File

@ -0,0 +1,42 @@
#include <iostream>
#include <numeric>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 1e5 + 5;
int n, m, c[N];
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> m;
while (n--) {
int l, r;
cin >> l >> r;
l--;
for (int i = 1, j = 0; i <= r; i = j + 1) {
if (l / i == 0) j = r;
else j = std::min(l / (l / i), r / (r / i));
if (r / i - l / i > 0) {
c[i]++, c[j + 1]--;
}
}
}
std::partial_sum(c + 1, c + 1 + m, c + 1);
for (int i = 1; i <= m; i++) {
cout << c[i] << endl;
}
return 0;
}

BIN
S2OJ/1664/data/ex_souvenir1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/ex_souvenir1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/ex_souvenir2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/ex_souvenir2.out (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.

BIN
S2OJ/1664/data/souvenir1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1664/data/souvenir9.out (Stored with Git LFS) Normal file

Binary file not shown.