implementer.cpp: In function ‘int query(std::vector<int>)’:
implementer.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d",&ret);
| ~~~~~^~~~~~~~~~~
implementer.cpp: In function ‘int main()’:
implementer.cpp:24:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
24 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
answer.code: In function ‘void solve(int)’:
answer.code:14:7: error: ‘swap’ was not declared in this scope
14 | swap(b[i],b[j]);
| ^~~~
answer.code:14:7: note: suggested alternatives:
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from answer.code:3:
/usr/include/c++/14/bits/regex.h:2230:5: note: ‘std::__cxx11::swap’
2230 | swap(match_results<_Bi_iter, _Alloc>& __lhs,
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:61,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/vector:62,
from library3.h:1,
from answer.code:1:
/usr/include/c++/14/bits/move.h:213:5: note: ‘std::swap’
213 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/14/bits/move.h:213:5: note: ‘std::swap’
In file included from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/stdexcept:38,
from /usr/include/c++/14/system_error:43,
from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/bits/exception_ptr.h:230:5: note: ‘std::__exception_ptr::swap’
230 | swap(exception_ptr& __lhs, exception_ptr& __rhs)
| ^~~~
In file included from /usr/include/c++/14/filesystem:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_path.h:736:15: note: ‘std::filesystem::__cxx11::swap’
736 | inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
| ^~~~
answer.code:23:15: error: ‘j’ was not declared in this scope
23 | swap(b[i],b[j]);
| ^
answer.code:23:3: error: ‘swap’ was not declared in this scope
23 | swap(b[i],b[j]);
| ^~~~
answer.code:23:3: note: suggested alternatives:
/usr/include/c++/14/bits/regex.h:2230:5: note: ‘std::__cxx11::swap’
2230 | swap(match_results<_Bi_iter, _Alloc>& __lhs,
| ^~~~
/usr/include/c++/14/bits/move.h:213:5: note: ‘std::swap’
213 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/14/bits/move.h:213:5: note: ‘std::swap’
/usr/include/c++/14/bits/exception_ptr.h:230:5: note: ‘std::__exception_ptr::swap’
230 | swap(exception_ptr& __lhs, exception_ptr& __rhs)
| ^~~~
/usr/include/c++/14/bits/fs_path.h:736:15: note: ‘std::filesystem::__cxx11::swap’
736 | inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
| ^~~~