Submission #387732

# Submission time Handle Problem Language Result Execution time Memory
387732 2021-04-09T06:41:54 Z Nima_Naderi Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
27 / 100
3706 ms 24096 KB
#include <bits/stdc++.h>
using namespace std;
int encode (int n, int x, int y) {
    int h = 0, xr = x ^ y;
    for(int i = 0; i < 10; i ++){
        if((xr >> i) & 1LL){
            h = i * 2 + ((x >> i) & 1LL);
            h ++;
            return h;
        }
    }
    return -1;
}
#include <bits/stdc++.h>
using namespace std;
int decode (int n, int q, int h) {
    h --;
    bool g = h & 1LL; h /= 2;
    return (((q >> h) & 1LL) == g);
}
# Verdict Execution time Memory Grader output
1 Partially correct 3706 ms 24096 KB Output is partially correct - maxh = 20
2 Partially correct 3671 ms 24080 KB Output is partially correct - maxh = 20