Submission #1034146

#TimeUsernameProblemLanguageResultExecution timeMemory
1034146vjudge1cmp (balkan11_cmp)C++17
Compilation error
0 ms0 KiB
#include "cmp.h" #include <bits/stdc++.h> using namespace std; string abc = "abcdefghijklmnopqrstuvwxyz"; #define int long long void bit_set(int addr); int bit_get (int addr); void remember(int a){ int cur = 21; for(int i = 0; i < 11; i+=2){ if((1<<i)&a && (1<<(i+1))&a){ bit_set(cur); } else if((1<<i)&a){ bit_set(i); } else if((1<<(i+1))&a){ bit_set(i+1); } cur++; } } int compare(int a){ int cur = 26; for(int i = 11; i >= 1; i--){ if(a&(1<<i) && a&(1<<(i-1))){ int f = bit_set(cur); if(f) continue; return 1; } if(a&(1<<i)){ // int f = bit_set(cur); int x = bit_set(i); int y = bit_set(i-1); if(x&&y) return -1; if(x) continue; return 1; } if(a&(1<<(i-1))){ int x = bit_set(i); int y = bit_set(i-1); if(x&&y) return -1; if(x) return -1; if(y) continue; return 1; } int x = bit_set(i); int y = bit_set(i-1); if(x||y){ return -1; } continue; } return 0; }

Compilation message (stderr)

cmp.cpp: In function 'long long int compare(long long int)':
cmp.cpp:34:28: error: void value not ignored as it ought to be
   34 |             int f = bit_set(cur);
      |                     ~~~~~~~^~~~~
cmp.cpp:40:28: error: void value not ignored as it ought to be
   40 |             int x = bit_set(i);
      |                     ~~~~~~~^~~
cmp.cpp:41:28: error: void value not ignored as it ought to be
   41 |             int y = bit_set(i-1);
      |                     ~~~~~~~^~~~~
cmp.cpp:48:28: error: void value not ignored as it ought to be
   48 |             int x = bit_set(i);
      |                     ~~~~~~~^~~
cmp.cpp:49:28: error: void value not ignored as it ought to be
   49 |             int y = bit_set(i-1);
      |                     ~~~~~~~^~~~~
cmp.cpp:55:24: error: void value not ignored as it ought to be
   55 |         int x = bit_set(i);
      |                 ~~~~~~~^~~
cmp.cpp:56:24: error: void value not ignored as it ought to be
   56 |         int y = bit_set(i-1);
      |                 ~~~~~~~^~~~~