GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 19 / 0 / 19
Functions: 100.0% 1 / 0 / 1
Branches: 71.4% 20 / 0 / 28

test/cpv/aizu-alds1/alds1_4_c.hash-chash.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
6 using namespace tifa_libs;
7 template <class T>
8 using hashfunc_t = chash<T>;
9 using namespace tifa_libs;
10 template <class T>
11 using hashset = std::unordered_set<T, std::conditional_t<std::is_void_v<hashfunc_t<T>>, std::hash<T>, hashfunc_t<T>>>;
12
13 10 int main() {
14
1/2
✓ Branch 2 taken 10 times.
✗ Branch 3 not taken.
10 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
15 u32 n;
16
1/2
✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
10 std::cin >> n;
17 10 hashset<u64> dict;
18
2/2
✓ Branch 0 taken 2015296 times.
✓ Branch 1 taken 10 times.
2015306 flt_ (u32, i, 0, n) {
19 2015296 strn s, t;
20
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;
21 2015296 u64 x = 0;
22
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) {
23 4029502 case 'A': ++x; [[fallthrough]];
24 8060123 case 'C': ++x; [[fallthrough]];
25 12088072 case 'G': ++x; [[fallthrough]];
26 16119252 default: (++x) *= 5;
27 }
28
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')
29
1/2
✓ Branch 1 taken 1150297 times.
✗ Branch 2 not taken.
1150297 dict.insert(x);
30 else
31
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");
32 2015296 }
33 10 return 0;
34 10 }
35