test/cpv/aizu-alds1/alds1_4_c.hash-splitmix64.hashset-std_hset.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #define AUTO_GENERATED | ||
| 2 | // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/lesson/1/ALDS1/all/ALDS1_4_C | ||
| 3 | #include "../../../src/util/alias/others/lib.hpp" | ||
| 4 | // | ||
| 5 | #include "../../../src/edh/splitmix64/lib.hpp" | ||
| 6 | |||
| 7 | using namespace tifa_libs; | ||
| 8 | template <class> | ||
| 9 | using hashfunc_t = hash_splitmix64; | ||
| 10 | using namespace tifa_libs; | ||
| 11 | template <class T> | ||
| 12 | using hashset = std::unordered_set<T, std::conditional_t<std::is_void_v<hashfunc_t<T>>, std::hash<T>, hashfunc_t<T>>>; | ||
| 13 | |||
| 14 | 10 | int main() { | |
| 15 |
1/2✓ Branch 2 taken 10 times.
✗ Branch 3 not taken.
|
10 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 16 | u32 n; | ||
| 17 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | std::cin >> n; |
| 18 | 10 | hashset<u64> dict; | |
| 19 |
2/2✓ Branch 0 taken 2015296 times.
✓ Branch 1 taken 10 times.
|
2015306 | flt_ (u32, i, 0, n) { |
| 20 | 2015296 | strn s, t; | |
| 21 |
2/4✓ Branch 1 taken 2015296 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 2015296 times.
✗ Branch 5 not taken.
|
2015296 | std::cin >> s >> t; |
| 22 | 2015296 | u64 x = 0; | |
| 23 |
6/6✓ Branch 3 taken 4029502 times.
✓ Branch 4 taken 4030621 times.
✓ Branch 5 taken 4027949 times.
✓ Branch 6 taken 4031180 times.
✓ Branch 8 taken 16119252 times.
✓ Branch 9 taken 2015296 times.
|
18134548 | for (char c : t) switch (c) { |
| 24 | 4029502 | case 'A': ++x; [[fallthrough]]; | |
| 25 | 8060123 | case 'C': ++x; [[fallthrough]]; | |
| 26 | 12088072 | case 'G': ++x; [[fallthrough]]; | |
| 27 | 16119252 | default: (++x) *= 5; | |
| 28 | } | ||
| 29 |
3/4✓ Branch 1 taken 2015296 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1150297 times.
✓ Branch 4 taken 864999 times.
|
2015296 | if (s[0] == 'i') |
| 30 |
1/2✓ Branch 1 taken 1150297 times.
✗ Branch 2 not taken.
|
1150297 | dict.insert(x); |
| 31 | else | ||
| 32 |
4/6✓ Branch 2 taken 864999 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 445792 times.
✓ Branch 6 taken 419207 times.
✓ Branch 8 taken 864999 times.
✗ Branch 9 not taken.
|
864999 | std::cout << (dict.find(x) != end(dict) ? "yes\n" : "no\n"); |
| 33 | 2015296 | } | |
| 34 | 10 | return 0; | |
| 35 | 10 | } | |
| 36 |