boat.cpp: In member function 'void fen::upd(int, int)':
boat.cpp:29:20: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
pos = pos | pos + 1;
~~~~^~~
boat.cpp: In member function 'int fen::get(int)':
boat.cpp:36:15: warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]
r = (r & r + 1) - 1;
~~^~~
boat.cpp: At global scope:
boat.cpp:43:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main() {
^
boat.cpp: In function 'int main()':
boat.cpp:44:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
boat.cpp:48:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &a[i], &b[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~