# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1141347 | 2025-01-28 15:28:13 | tfgs | Snake Escaping (JOI18_snake_escaping) | C++17 | Compilation error | 0 ms | 0 KiB |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
#pragma GCC target("avx2")
#ifdef LOCAL
#include "algo/debug.h"
#else
template <typename... Args>
void dummy(Args&&... args){}
#define ps dummy
#endif
#define f first
#define s second
template<class T> using V = vector<T>;
using vi = V<int>;
using vb = V<bool>;
using vs = V<string>;
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define len(x) (int)((x).size())
#define rsz resize
#define ins insert
#define ft front()
#define bk back()
#define pb push_back
#define lb lower_bound
#define ub upper_bound
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Compilation message (stderr)
snake_escaping.cpp: In lambda function: snake_escaping.cpp:27:17: error: no match for 'operator=' (operand types are 'std::tuple<int&, int&>' and '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'}) 27 | #define bk back() | ^ snake_escaping.cpp:104:29: note: in expansion of macro 'bk' 104 | tie(l, r) = lrs.bk; | ^~ In file included from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from snake_escaping.cpp:1: /usr/include/c++/11/tuple:1290:9: note: candidate: 'template<class _U1, class _U2> std::__enable_if_t<__assignable<const _U1&, const _U2&>(), std::tuple<_T1, _T2>&> std::tuple<_T1, _T2>::operator=(const std::tuple<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int&; _T2 = int&]' 1290 | operator=(const tuple<_U1, _U2>& __in) | ^~~~~~~~ /usr/include/c++/11/tuple:1290:9: note: template argument deduction/substitution failed: snake_escaping.cpp:27:17: note: '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'} is not derived from 'const std::tuple<_T1, _T2>' 27 | #define bk back() | ^ snake_escaping.cpp:104:29: note: in expansion of macro 'bk' 104 | tie(l, r) = lrs.bk; | ^~ In file included from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from snake_escaping.cpp:1: /usr/include/c++/11/tuple:1300:9: note: candidate: 'template<class _U1, class _U2> std::__enable_if_t<__assignable<_U1, _U2>(), std::tuple<_T1, _T2>&> std::tuple<_T1, _T2>::operator=(std::tuple<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int&; _T2 = int&]' 1300 | operator=(tuple<_U1, _U2>&& __in) | ^~~~~~~~ /usr/include/c++/11/tuple:1300:9: note: template argument deduction/substitution failed: snake_escaping.cpp:27:17: note: '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'} is not derived from 'std::tuple<_T1, _T2>' 27 | #define bk back() | ^ snake_escaping.cpp:104:29: note: in expansion of macro 'bk' 104 | tie(l, r) = lrs.bk; | ^~ In file included from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from snake_escaping.cpp:1: /usr/include/c++/11/tuple:1310:9: note: candidate: 'template<class _U1, class _U2> std::__enable_if_t<__assignable<const _U1&, const _U2&>(), std::tuple<_T1, _T2>&> std::tuple<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int&; _T2 = int&]' 1310 | operator=(const pair<_U1, _U2>& __in) | ^~~~~~~~ /usr/include/c++/11/tuple:1310:9: note: template argument deduction/substitution failed: snake_escaping.cpp:27:17: note: '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'} is not derived from 'const std::pair<_T1, _T2>' 27 | #define bk back() | ^ snake_escaping.cpp:104:29: note: in expansion of macro 'bk' 104 | tie(l, r) = lrs.bk; | ^~ In file included from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from snake_escaping.cpp:1: /usr/include/c++/11/tuple:1321:9: note: candidate: 'template<class _U1, class _U2> std::__enable_if_t<__assignable<_U1, _U2>(), std::tuple<_T1, _T2>&> std::tuple<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int&; _T2 = int&]' 1321 | operator=(pair<_U1, _U2>&& __in) | ^~~~~~~~ /usr/include/c++/11/tuple:1321:9: note: template argument deduction/substitution failed: snake_escaping.cpp:27:17: note: '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'} is not derived from 'std::pair<_T1, _T2>' 27 | #define bk back() | ^ snake_escaping.cpp:104:29: note: in expansion of macro 'bk' 104 | tie(l, r) = lrs.bk; | ^~ In file included from /usr/include/c++/11/functional:54, from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13, from /usr/include/c++/11/algorithm:74, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65, from snake_escaping.cpp:1: /usr/include/c++/11/tuple:1267:7: note: candidate: 'std::tuple<_T1, _T2>& std::tuple<_T1, _T2>::operator=(typename std::conditional<__assignable<const _T1&, const _T2&>(), const std::tuple<_T1, _T2>&, const std::__nonesuch&>::type) [with _T1 = int&; _T2 = int&; typename std::conditional<__assignable<const _T1&, const _T2&>(), const std::tuple<_T1, _T2>&, const std::__nonesuch&>::type = const std::tuple<int&, int&>&]' 1267 | operator=(typename conditional<__assignable<const _T1&, const _T2&>(), | ^~~~~~~~ /usr/include/c++/11/tuple:1269:63: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'} to 'std::conditional<true, const std::tuple<int&, int&>&, const std::__nonesuch&>::type' {aka 'const std::tuple<int&, int&>&'} 1267 | operator=(typename conditional<__assignable<const _T1&, const _T2&>(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1268 | const tuple&, | ~~~~~~~~~~~~~ 1269 | const __nonesuch&>::type __in) | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ /usr/include/c++/11/tuple:1278:7: note: candidate: 'std::tuple<_T1, _T2>& std::tuple<_T1, _T2>::operator=(typename std::conditional<__assignable<_T1, _T2>(), std::tuple<_T1, _T2>&&, std::__nonesuch&&>::type) [with _T1 = int&; _T2 = int&; typename std::conditional<__assignable<_T1, _T2>(), std::tuple<_T1, _T2>&&, std::__nonesuch&&>::type = std::tuple<int&, int&>&&]' 1278 | operator=(typename conditional<__assignable<_T1, _T2>(), | ^~~~~~~~ /usr/include/c++/11/tuple:1280:58: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type' {aka 'std::array<int, 2>'} to 'std::conditional<true, std::tuple<int&, int&>&&, std::__nonesuch&&>::type' {aka 'std::tuple<int&, int&>&&'} 1278 | operator=(typename conditional<__assignable<_T1, _T2>(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1279 | tuple&&, | ~~~~~~~~ 1280 | __nonesuch&&>::type __in) | ~~~~~~~~~~~~~~~~~~~~^~~~