Submission #405722

#TimeUsernameProblemLanguageResultExecution timeMemory
405722VictorQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++17
0 / 100
2 ms400 KiB
#define rep(i, a, b) for (int i = a; i < (b); ++i) int encode(int n, int x, int y) { rep(i, 0, 12) if (x & 1 << i && !(y & 1 << i)) return i + 1; return 0; }
int decode(int n, int q, int h) { return q & 1 << h - 1 ? 1 : 0; }

Compilation message (stderr)

decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:2:23: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
    2 |     return q & 1 << h - 1 ? 1 : 0;
      |                     ~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...