0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-24 00:48:47 +00:00

#1737. 【2022.11.7 NOIP 模拟赛】荤数(brime)

https://sjzezoj.com/submission/63729
This commit is contained in:
Baoshuo Ren 2022-11-07 21:57:58 +08:00
parent 8d5d8efebd
commit 01e14ba3fc
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
64 changed files with 221 additions and 0 deletions

32
S2OJ/1737/1737.cpp Normal file
View File

@ -0,0 +1,32 @@
#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 1e7 + 5;
long long l, r, k, ans;
int cnt, primes[N];
bool vis[N];
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> l >> r >> k;
for (long long i = 2; i * i <= r && i <= k; i++) {
for (long long j = std::max(((l + i - 1) / i) * i, i * 2); j <= r; j += i) {
vis[j - l + 1] = true;
}
}
for (long long i = l; i <= r; i++) {
if (!vis[i - l + 1]) ans ^= i;
}
cout << ans << endl;
return 0;
}

BIN
S2OJ/1737/data/ex_prime1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/ex_prime1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/ex_prime2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/ex_prime2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/ex_prime3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/ex_prime3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime11.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime11.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime12.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime12.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime13.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime13.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime14.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime14.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime15.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime15.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime16.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime16.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime17.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime17.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime18.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime18.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime19.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime19.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime20.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime20.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime21.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime21.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime22.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime22.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime23.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime23.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime24.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime24.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime25.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime25.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime26.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime26.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime27.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime27.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime28.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime28.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1737/data/prime9.out (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.