제출 #564679

#제출 시각아이디문제언어결과실행 시간메모리
564679shrimbQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++17
0 / 100
1932 ms24096 KiB
#include"bits/stdc++.h" using namespace std; int encode (int n, int x, int y) { int ret = 0; int flag = 0; while (x) { flag++; 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; int flag = 0; while (x) { flag++; while (x % 2 == 0) ret+=flag+1, x/=2; while (x % 2) ret+=flag+2, x/=2; } return ret == h; }
#Verdict Execution timeMemoryGrader output
Fetching results...