# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1173145 | rayan_bd | Klasika (COCI20_klasika) | C++17 | 681 ms | 589824 KiB |
#include <bits/stdc++.h>
using namespace std;
#define getar(ar,n) for(int i=0;i<n;++i) cin>>ar[i]
#define show(n) cout<<n<<'\n'
#define all(v) v.begin(), v.end()
#define pb push_back
#define nl '\n'
const int mxN = 2e5 + 500;
int N=1, idx=0, parent[mxN], depth[mxN], heavy[mxN], head[mxN], sz[mxN], tin[mxN], tout[mxN], seg[mxN*4], val[mxN], till[mxN];
vector<pair<int,int>> adj[mxN];
struct Node {
Node* children[2];
Node() {
children[0] = children[1] = nullptr;
}
};
struct Trie {
Node* root;
Trie() { root = new Node(); }
void add(int x) {
Node* curr = root;
for (int i = 30; i >= 0; --i) {
int bit = (x >> i) & 1;
if (!curr->children[bit]) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |