# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
768406 | DylanSmith | Klasika (COCI20_klasika) | C++17 | 778 ms | 524288 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>
using namespace std;
typedef long long ll;
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) begin(x),end(x)
#define lb(x,y) lower_bound(all(x),y)-begin(x)
mt19937 rng;
typedef struct Node {
int adj[2], par; bool end;
Node(int p = -1) {
end = 0; par = p;
fill(adj, adj + 2, -1);
}
} node;
int add(vector<node> &tree, int n) {
int cur = 0;
for (int i = 29; i >= 0; i--) {
if ((n & 1 << i) == 0) {
if (tree[cur].adj[0] == -1) {
tree[cur].adj[0] = sz(tree);
tree.emplace_back(cur);
}
cur = tree[cur].adj[0];
# | 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... |