제출 #451546

#제출 시각아이디문제언어결과실행 시간메모리
451546kingfran1907Question (Grader is different from the original contest) (CEOI14_question_grader)C++14
27 / 100
4242 ms24196 KiB
int encode (int n, int x, int y) { for (int i = 0; i < 20; i++) { if ((x & (1 << i)) != (y & (1 << i))) { if (x & (1 << i)) return 2 * i + 2; else return 2 * i + 1; } } }
int decode (int n, int q, int h) { h -= 1; int dig = h / 2; int ac = h % 2; if ((q & (1 << dig)) == (ac << dig)) return 1; else return 0; }

컴파일 시 표준 에러 (stderr) 메시지

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:8:1: warning: control reaches end of non-void function [-Wreturn-type]
    8 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...