test/cpv/aizu-alds1/alds1_14_d.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/1/ALDS1/all/ALDS1_14_D/ | ||
| 2 | #include "../../../src/str/suffix_array/lib.hpp" | ||
| 3 | |||
| 4 | using namespace tifa_libs; | ||
| 5 | 18 | int main() { | |
| 6 |
1/2✓ Branch 2 taken 18 times.
✗ Branch 3 not taken.
|
18 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 7 | 18 | strn t, s; | |
| 8 |
1/2✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
|
18 | std::cin >> t; |
| 9 |
1/2✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
|
18 | t = " " + t; |
| 10 | u32 n; | ||
| 11 |
1/2✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
|
18 | std::cin >> n; |
| 12 | 18 | suffix_array sa(t); | |
| 13 |
2/2✓ Branch 0 taken 73292 times.
✓ Branch 1 taken 18 times.
|
73310 | flt_ (u32, i, 0, n) { |
| 14 |
1/2✓ Branch 1 taken 73292 times.
✗ Branch 2 not taken.
|
73292 | std::cin >> s; |
| 15 |
1/2✓ Branch 1 taken 73292 times.
✗ Branch 2 not taken.
|
73292 | s = " " + s; |
| 16 |
3/6✓ Branch 1 taken 73292 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 73292 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 73292 times.
✗ Branch 9 not taken.
|
73292 | std::cout << bool(sa.frequency(s)) << '\n'; |
| 17 | } | ||
| 18 | 18 | return 0; | |
| 19 | 18 | } | |
| 20 |