Submission #564678

# Submission time Handle Problem Language Result Execution time Memory
564678 2022-05-19T12:56:21 Z shrimb Question (Grader is different from the original contest) (CEOI14_question_grader) C++17
0 / 100
1900 ms 24100 KB
#include"bits/stdc++.h"
using namespace std;
int encode (int n, int x, int y) {
    int ret = 0;
    bool flag = 0;
    while (x) {
        flag ^= 1;
        while (x % 2 == 0) ret+=flag+1, x/=2;
        while (x % 2) ret+=flag+2, x/=2;
    }
    return ret;
}
#include"bits/stdc++.h"
using namespace std;
int decode (int n, int q, int h) {
	int x = q;
	int ret = 0;
	bool flag = 0;
    while (x) {
        flag ^= 1;
        while (x % 2 == 0) ret+=flag+1, x/=2;
        while (x % 2) ret+=flag+2, x/=2;
    }
	return ret == h;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1900 ms 24008 KB wrong answer
2 Incorrect 1888 ms 24100 KB wrong answer