# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
164891 | arnold518 | 질문 (CEOI14_question_grader) | C++14 | 5 ms | 844 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;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
int encode(int N, int X, int Y)
{
int i, j;
vector<int> V;
V.push_back(-1);
for(i=0; i<(1<<12); i++) if(__builtin_popcount(i)==6) V.push_back(i);
X=V[X]; Y=V[Y];
for(i=0; i<12; i++) if(X&(1<<i) && !(Y&(1<<i))) return i;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
int decode(int N, int Q, int H)
{
int i, j;
vector<int> V;
V.push_back(-1);
for(i=0; i<(1<<12); i++) if(__builtin_popcount(i)==6) V.push_back(i);
Q=V[Q];
if(Q&(1<<H)) return 1;
else return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |