# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
565178 | Dodo | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 1914 ms | 24116 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 endl '\n'
#define pb push_back
using namespace std;
int encode (int n, int x, int y)
{
int h;
for(int i=0;i<=9;i++)
{
bool f,s;
if((x&(1<<i)))f=1;
else f=0;
if((y&(1<<i)))s=1;
else s=0;
if(x==1&&y==0)
return i;
if(x==0&&y==1)h=i;
}
return (10+h);
}
#include <bits/stdc++.h>
#define ll long long
#define endl '\n'
#define pb push_back
using namespace std;
int decode (int n, int q, int h)
{
if(h<10)
{
if((q&(1<<h)))
return 1;
else return 0;
}
else
{
h-=10;
if((q&(1<<h)))
return 0;
else return 1;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |