# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
564822 | almothana05 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 3022 ms | 24180 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 <stdio.h>
#include <stdlib.h>
#include<bits/stdc++.h>
using namespace std;
string bi(int x){
string cmp;
while(x){
if(x % 2 == 0){
cmp +='0';
}
else{
cmp += '1';
}
x /= 2;
}
while(cmp.size() < 10){
cmp += '0';
}
return cmp;
}
int encode (int n, int x, int y) {
int re1 = 0 , re2 = 0;
string s , t;
s = bi(x);
t = bi(y);
for(int i = 0 ; i < s.size() ; i++){
if(s[i] == '1' && t[i] == '0'){
return i + 1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |