hac.cpp: In member function 'void SparseTable::init(int, int*, int (*)(int, int))':
hac.cpp:15:54: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
15 | st[j][i] = f(st[j - 1][i], st[j - 1][i + (1 << j - 1)]);
| ~~^~~
hac.cpp: In function 'int32_t main()':
hac.cpp:33:17: error: invalid conversion from 'unsigned int*' to 'int*' [-fpermissive]
33 | ST.init(n * 2, b, [](int a, int b){ return min(a, b); });
| ^
| |
| unsigned int*
hac.cpp:10:24: note: initializing argument 2 of 'void SparseTable::init(int, int*, int (*)(int, int))'
10 | void init(int n, int* a, int (*g)(int, int)){
| ~~~~~^