vjestica.cpp:5:52: error: 'int dup [65541]' redeclared as different kind of entity
5 | int n, cnt[20][26], f[(1<<16) + 5], dup[(1<<16) + 5];
| ^
In file included from /usr/include/c++/13/bits/atomic_wait.h:45,
from /usr/include/c++/13/bits/atomic_base.h:42,
from /usr/include/c++/13/bits/shared_ptr_atomic.h:33,
from /usr/include/c++/13/memory:81,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:56,
from vjestica.cpp:1:
/usr/include/unistd.h:552:12: note: previous declaration 'int dup(int)'
552 | extern int dup (int __fd) __THROW __wur;
| ^~~
vjestica.cpp: In function 'int32_t main()':
vjestica.cpp:25:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
25 | dup[msk] += tmp;
| ^
vjestica.cpp:25:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
25 | dup[msk] += tmp;
| ~~~~~~~~~^~~~~~
vjestica.cpp:25:16: error: assignment of read-only location '*(dup + ((sizetype)msk))'
vjestica.cpp:33:74: warning: pointer to a function used in arithmetic [-Wpointer-arith]
33 | if(sub != msk) f[msk] = min(f[msk], f[sub] + f[msk ^ sub] - dup[msk]);
| ^
vjestica.cpp:33:65: error: invalid operands of types 'int' and 'int(int) noexcept' to binary 'operator-'
33 | if(sub != msk) f[msk] = min(f[msk], f[sub] + f[msk ^ sub] - dup[msk]);
| ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
| | |
| int int(int) noexcept