test/cpv/library-checker-datastructure/set_xor_min.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/set_xor_min/ | ||
| 2 | #include "../../../src/ds/trie01/lib.hpp" | ||
| 3 | |||
| 4 | using namespace tifa_libs; | ||
| 5 | 12 | int main() { | |
| 6 |
1/2✓ Branch 2 taken 12 times.
✗ Branch 3 not taken.
|
12 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 7 | u32 q; | ||
| 8 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
12 | std::cin >> q; |
| 9 | 12 | trie01 trie(30); | |
| 10 |
2/2✓ Branch 0 taken 4406203 times.
✓ Branch 1 taken 12 times.
|
4406215 | for (u32 i = 0, t, x; i < q; ++i) { |
| 11 |
2/4✓ Branch 1 taken 4406203 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 4406203 times.
✗ Branch 5 not taken.
|
4406203 | std::cin >> t >> x; |
| 12 |
3/4✓ Branch 0 taken 1552077 times.
✓ Branch 1 taken 802734 times.
✓ Branch 2 taken 2051392 times.
✗ Branch 3 not taken.
|
4406203 | switch (t) { |
| 13 | 1552077 | case 0: | |
| 14 |
2/2✓ Branch 2 taken 1418397 times.
✓ Branch 3 taken 133680 times.
|
1552077 | if (!trie.data[trie.find(x)].val) trie.add(x); |
| 15 | 1552077 | break; | |
| 16 | 802734 | case 1: | |
| 17 |
2/2✓ Branch 2 taken 402199 times.
✓ Branch 3 taken 400535 times.
|
802734 | if (trie.data[trie.find(x)].val) trie.add(x, -1); |
| 18 | 802734 | break; | |
| 19 | 2051392 | case 2: | |
| 20 |
2/4✓ Branch 2 taken 2051392 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 2051392 times.
✗ Branch 6 not taken.
|
2051392 | std::cout << trie.kth_element(0, x).first << "\n"; |
| 21 | } | ||
| 22 | } | ||
| 23 | 12 | return 0; | |
| 24 | 12 | } | |
| 25 |