# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
282132 | thtsshz_bgwrswh | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 4612 ms | 48248 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<algorithm>
#include<string>
using namespace std;
static bool first=1;
static string s[925];
int encode(int n,int x,int y){
int i;
if(first){
first=0;
s[1]="000000111111";
for(i=2;i<=920;i++){
s[i]=s[i-1];
next_permutation(s[i].begin(),s[i].end());
}
}
for(i=0;i<12;i++)
if(s[x][i]=='1'&&s[y][i]=='0')
return i+1;
}
#include<algorithm>
#include<string>
using namespace std;
static bool first=1;
static string s[925];
int decode(int n,int q,int h){
int i;
if(first){
first=0;
s[1]="000000111111";
for(i=2;i<=920;i++){
s[i]=s[i-1];
next_permutation(s[i].begin(),s[i].end());
}
}
return s[q][h-1]=='1';
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |