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

#911. [2018.8雅礼集训8.6]Prime

https://sjzezoj.com/submission/59148
This commit is contained in:
Baoshuo Ren 2022-10-03 11:53:25 +08:00
parent 03b2faa1dd
commit cd4ff02b4d
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
64 changed files with 221 additions and 0 deletions

32
S2OJ/911/911.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/911/data/ex_prime1.in (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.