test/cpv/library-checker-number_theory/sqrt_mod.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/sqrt_mod | ||
| 2 | #include "../../../src/nt/residue/q/lib.hpp" | ||
| 3 | |||
| 4 | using namespace tifa_libs; | ||
| 5 | 13 | int main() { | |
| 6 |
1/2✓ Branch 2 taken 13 times.
✗ Branch 3 not taken.
|
13 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 7 | i64 t; | ||
| 8 |
1/2✓ Branch 1 taken 13 times.
✗ Branch 2 not taken.
|
13 | std::cin >> t; |
| 9 |
2/2✓ Branch 0 taken 924317 times.
✓ Branch 1 taken 13 times.
|
924330 | while (t--) { |
| 10 | u64 y, p; | ||
| 11 |
2/4✓ Branch 1 taken 924317 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 924317 times.
✗ Branch 5 not taken.
|
924317 | std::cin >> y >> p; |
| 12 | 924317 | auto res = qresidue(y, p); | |
| 13 |
5/8✓ Branch 1 taken 464863 times.
✓ Branch 2 taken 459454 times.
✓ Branch 4 taken 464863 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 924317 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 924317 times.
✗ Branch 11 not taken.
|
924317 | std::cout << (res ? (i64)res.value() : -1) << '\n'; |
| 14 | } | ||
| 15 | 13 | return 0; | |
| 16 | } | ||
| 17 |