# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
704203 | assem_albitar | XOR (IZhO12_xor) | C++14 | 212 ms | 60384 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 ll long long
#define assem ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
ll n,k=31,x;
vector<ll> v;
ll id,mx=-1;
struct trie
{
ll mn;
trie* child[2];
trie()
{
mn=INT_MAX;
memset(child,0,sizeof child);
}
void add(int i,bitset<32> b,ll id)
{
if(i==-1)
{
mn=min(mn,id);
return;
}
if(child[b[i]]==0)child[b[i]]=new trie();
child[b[i]]->add(i-1,b,id);
if(child[0]!=0)mn=min(mn,child[0]->mn);
if(child[1]!=0)mn=min(mn,child[1]->mn);
}
ll get(int i,bitset<32> b1,bitset<32> b2,ll m)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |