Submission #1034211

#TimeUsernameProblemLanguageResultExecution timeMemory
1034211vjudge1cmp (balkan11_cmp)C++17
Compilation error
0 ms0 KiB
#include "cmp.h" #include <bits/stdc++.h> using namespace std; void remember(int n) { int x = __builtin_popcount(n); if (x < 1 + 12-x) { for (int i = 0; i <= 11; i++) { if ((n >> i) & 1) bit_set(i+1); } } else { bit_set(13); for (int i = 0; i <= 11; i++) { if (!((n >> i) & 1)) bit_set(i+1); } } } int compare(int n) { int inv = bit_get(13); for (int i = 11; i >= 0; i--) { int x = bit_get(i+1); if (inv) x = !x; int y = (n >> i) & 1; if (x > y) return -1; else if (x < y) return 1; } return 0 }

Compilation message (stderr)

cmp.cpp: In function 'int compare(int)':
cmp.cpp:32:11: error: expected ';' before '}' token
   32 |   return 0
      |           ^
      |           ;
   33 | }
      | ~