# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
351623 | Bill_00 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 7063 ms | 46604 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 N 100001
#define MOD 998244353
#define ll long long
#define pb push_back
const int M=62;
using namespace std;
string s[1000];
int encode (int n, int x, int y) {
for(int i=0;i<12;i++){
s[1]+=((i<6)?'1':'0');
}
for(int i=2;i<=920;i++){
s[i]=s[i-1];
next_permutation(s[i].begin(),s[i].end());
}
for(int i=0;i<12;i++){
if(s[x][i]=='1' && s[y][i]=='0'){
return i;
}
}
}
#include <bits/stdc++.h>
// #define N 100001
#define MOD 998244353
#define ll long long
#define pb push_back
const int M=62;
using namespace std;
string s[1000];
int decode (int n, int q, int h) {
for(int i=0;i<12;i++){
s[1]+=((i<6)?'1':'0');
}
for(int 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... |