test/cpv/library-checker-number_theory/enumerate_primes.pseq.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/enumerate_primes | ||
| 2 | #include "../../../src/io/fastin/lib.hpp" | ||
| 3 | #include "../../../src/io/fastout/lib.hpp" | ||
| 4 | #include "../../../src/nt/prime_seq/lib.hpp" | ||
| 5 | |||
| 6 | using namespace tifa_libs; | ||
| 7 | 10 | int main() { | |
| 8 | u32 n, a, b; | ||
| 9 | 10 | fin_uint >> n >> a >> b; | |
| 10 | 10 | auto prime = prime_seq(n); | |
| 11 | 10 | fout << prime.size() << ' ' << (prime.size() + a - 1 - b) / a << '\n'; | |
| 12 |
2/2✓ Branch 5 taken 4182473 times.
✓ Branch 6 taken 10 times.
|
4182483 | for (u32 i = b; i < prime.size(); i += a) fout << prime[i] << " \n"[i + a >= prime.size()]; |
| 13 | 10 | return 0; | |
| 14 | 10 | } | |
| 15 |