GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 11 / 0 / 11
Functions: 100.0% 1 / 0 / 1
Branches: 58.3% 14 / 0 / 24

test/cpv/library-checker-datastructure/associative_array.hash-splitmix64.hashmap-pbds_gp_hmap.cpp
Line Branch Exec Source
1 #define AUTO_GENERATED
2 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/associative_array
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 K, class V>
12 using hashmap = __gnu_pbds::gp_hash_table<K, V, std::conditional_t<std::is_void_v<hashfunc_t<K>>, TPN __gnu_pbds::detail::default_hash_fn<K>::type, hashfunc_t<K>>>;
13
14 20 int main() {
15
1/2
✓ Branch 2 taken 20 times.
✗ Branch 3 not taken.
20 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
16 u64 q;
17
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 std::cin >> q;
18
1/2
✓ Branch 1 taken 20 times.
✗ Branch 2 not taken.
20 hashmap<u64, u64> hm;
19
2/2
✓ Branch 0 taken 15673163 times.
✓ Branch 1 taken 20 times.
15673183 for (u64 i = 0, op, k, v; i < q; ++i) {
20
2/4
✓ Branch 1 taken 15673163 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 15673163 times.
✗ Branch 5 not taken.
15673163 std::cin >> op >> k;
21
5/8
✓ Branch 0 taken 7647884 times.
✓ Branch 1 taken 8025279 times.
✓ Branch 3 taken 7647884 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 7647884 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 7647884 times.
✗ Branch 10 not taken.
15673163 if (op) std::cout << hm[k] << '\n';
22 else {
23
1/2
✓ Branch 1 taken 8025279 times.
✗ Branch 2 not taken.
8025279 std::cin >> v;
24
1/2
✓ Branch 1 taken 8025279 times.
✗ Branch 2 not taken.
8025279 hm[k] = v;
25 }
26 }
27 20 return 0;
28 20 }
29