test/cpv/library-checker-number_theory/discrete_logarithm_mod.exbsgs.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/discrete_logarithm_mod | ||
| 2 | #include "../../../src/io/fastin/lib.hpp" | ||
| 3 | #include "../../../src/io/fastout/lib.hpp" | ||
| 4 | #include "../../../src/nt/dlog/bsgs/lib.hpp" | ||
| 5 | #include "../../../src/nt/dlog/exbsgs/lib.hpp" | ||
| 6 | |||
| 7 | using namespace tifa_libs; | ||
| 8 | 20 | int main() { | |
| 9 | i64 t; | ||
| 10 | 20 | fin_uint >> t; | |
| 11 |
2/2✓ Branch 0 taken 1818 times.
✓ Branch 1 taken 20 times.
|
1838 | while (t--) { |
| 12 | u64 x, y, m; | ||
| 13 | 1818 | fin_uint >> x >> y >> m; | |
| 14 | 1818 | auto res = exbsgs(bsgs, x, y, m); | |
| 15 |
3/4✓ Branch 1 taken 763 times.
✓ Branch 2 taken 1055 times.
✓ Branch 4 taken 763 times.
✗ Branch 5 not taken.
|
1818 | fout << (res ? (i64)res.value() : -1) << '\n'; |
| 16 | } | ||
| 17 | 20 | return 0; | |
| 18 | } | ||
| 19 |