encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:20:46: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
20 | if ((aa&(1<<h)) && (bb&(1<<h)==0)) return h+1;
| ~~~~~~^~~
encoder.cpp:22:9: warning: control reaches end of non-void function [-Wreturn-type]
22 | }
| ^
decoder.cpp:1:30: warning: bad option '-fpopcnt' to pragma 'optimize' [-Wpragmas]
1 | #pragma GCC optimize("popcnt")
| ^
decoder.cpp:5:35: warning: bad option '-fpopcnt' to attribute 'optimize' [-Wattributes]
5 | int decode(int n, int q, int h)
| ^
decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:10:13: error: expected ',' or ';' before 'for'
10 | for (int j = 30; j < (1<<12); j++)
| ^~~
decoder.cpp:10:30: error: 'j' was not declared in this scope
10 | for (int j = 30; j < (1<<12); j++)
| ^
decoder.cpp:8:17: warning: unused variable 'k' [-Wunused-variable]
8 | int k = 0;
| ^