Problem OrXor
User MegaG
Submission Time 2026-01-14 20:22:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

OrXor.cpp: In function ‘int main()’:
OrXor.cpp:26:10: error: reference to ‘bit_or’ is ambiguous
26 | cout << bit_or(n, a) << '\n';
| ^~~~~~
In file included from /usr/include/c++/9/string:48,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from OrXor.cpp:1:
/usr/include/c++/9/bits/stl_function.h:867:12: note: candidates are: ‘template<class _Tp> struct std::bit_or’
867 | struct bit_or;
| ^~~~~~
OrXor.cpp:5:5: note: ‘long long int bit_or(long long int, long long int*)’
5 | int bit_or(int x, int arr[]) {
| ^~~~~~