| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1291589 | hynmj | Game (IOI14_game) | C++20 | Compilation error | 0 ms | 0 KiB |
#include "game.h"
#include<bits/stdc++.h>
const int N = 3000;
void initialize(int n)
{
}
int c[N];
int hasEdge(int u, int v)
{
if (u < v)
swap(u, v);
return ++c[u] == u;
}
Compilation message (stderr)
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:12:9: error: 'swap' was not declared in this scope
12 | swap(u, v);
| ^~~~
game.cpp:12:9: note: suggested alternatives:
In file included from /usr/include/c++/13/regex:68,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:181,
from game.cpp:2:
/usr/include/c++/13/bits/regex.h:2230:5: note: 'std::__cxx11::swap'
2230 | swap(match_results<_Bi_iter, _Alloc>& __lhs,
| ^~~~
In file included from /usr/include/c++/13/bits/stl_pair.h:61,
from /usr/include/c++/13/bits/stl_algobase.h:64,
from /usr/include/c++/13/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51:
/usr/include/c++/13/bits/move.h:189:5: note: 'std::swap'
189 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/13/bits/move.h:189:5: note: 'std::swap'
In file included from /usr/include/c++/13/compare:37,
from /usr/include/c++/13/bits/stl_pair.h:65:
/usr/include/c++/13/concepts:243:43: note: 'std::ranges::__cust::swap'
243 | inline constexpr __cust_swap::_Swap swap{};
| ^~~~
In file included from /usr/include/c++/13/exception:164,
from /usr/include/c++/13/stdexcept:38,
from /usr/include/c++/13/system_error:43,
from /usr/include/c++/13/bits/ios_base.h:46,
from /usr/include/c++/13/streambuf:43,
from /usr/include/c++/13/bits/streambuf_iterator.h:35,
from /usr/include/c++/13/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:54:
/usr/include/c++/13/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++/13/filesystem:49,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:200:
/usr/include/c++/13/bits/fs_path.h:736:15: note: 'std::filesystem::__cxx11::swap'
736 | inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
| ^~~~
/usr/include/c++/13/concepts:183:35: note: 'std::ranges::__cust_swap::swap'
183 | template<typename _Tp> void swap(_Tp&, _Tp&) = delete;
| ^~~~