# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
166676 | CaroLinda | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 1650 ms | 86056 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 lp(i,a,b) for(int i=a;i<b;i++)
#define ff first
#define ss second
#define pb push_back
#define ll long long
#define sz size()
using namespace std ;
int type , t , n , a , b ;
vector<int> v ;
bool ok = false ;
bool isOn(int m, int bit) { return ((1<<bit)&m) != 0 ; }
int encode(int n , int x , int y)
{
if(!ok)
{
lp(i,1,(1<<12))
if( __builtin_popcount(i) == 6 ) v.pb( i ) ;
ok = true ;
}
lp(i,0,12)
if( isOn(v[x-1],i) && !isOn(v[y-1], i) )
return i+1 ;
}
#include <bits/stdc++.h>
#define lp(i,a,b) for(int i=a;i<b;i++)
#define ff first
#define ss second
#define pb push_back
#define ll long long
#define sz size()
using namespace std ;
vector<int> v ;
bool ok = false ;
bool isOn(int m, int bit) { return ((1<<bit)&m) != 0 ; }
bool decode(int n, int q, int h)
{
if(!ok)
{
lp(i,1,(1<<12))
if( __builtin_popcount(i) == 6 ) v.pb(i) ;
ok = true ;
}
if( isOn(v[q-1],h-1) ) return true ;
return false ;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |