# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
870957 | hungnt | Klasika (COCI20_klasika) | C++14 | 2100 ms | 463196 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define BIT(x, i) (((x) >> (i)) & 1)
using namespace std;
const int N = 1e6 + 5;
struct node
{
set<int> s;
node *child[2];
node()
{
child[0] = child[1] = NULL;
}
};
struct Trie
{
node *root;
Trie() {
root = new node();
}
void add(int value, int id)
{
node *p = root;
for (int i = 30; i >= 0; i--)
{
int c = BIT(value, i);
if (p->child[c] == NULL) p->child[c] = new node();
p = p->child[c];
Compilation message (stderr)
# | 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... |