# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
564473 | MrDeboo | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 0 ms | 0 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;
int encode (int n, int x, int y) {
if(x>n)x=0;
if(y>n)y=0;
string s;
string f=to_string(x);
while(f.size()<3)f="0"+f;
s+=f;
f=to_string(y);
while(f.size()<3)f="0"+f;
s+=f;
return stoi(s);
}
#include <bits/stdc++.h>
using namespace std;
int decode (int n, int q, int h) {
string s=to_string(h);
int a=0;
for(int i=0;i<3;i++){
a+=(h.back()-'0')*ceil(pow(10,i));
h.pop_back();
}
int b=stoi(h);
if(q==b)return 1;
return 0;
}