QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#741247 | #9478. Shift Puzzle | jlgxy | Compile Error | / | / | C++14 | 6.3kb | 2024-11-13 13:56:40 | 2024-11-13 13:56:40 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘int main()’: answer.code:140:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 140 | auto [nw, v] = q.front(); q.pop(); | ^ answer.code:153:28: error: no matching function for call to ‘std::vector<std::array<int, 5> >::push_back(<brace-enclosed initializer list>)’ 153 | v.push_back({0, i, j, 3-i, 3-j}); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/13/vector:66, from answer.code:2: /usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 5>; _Alloc = std::allocator<std::array<int, 5> >; value_type = std::array<int, 5>]’ 1278 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1278:35: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::array<int, 5> >::value_type&’ {aka ‘const std::array<int, 5>&’} 1278 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::array<int, 5>; _Alloc = std::allocator<std::array<int, 5> >; value_type = std::array<int, 5>]’ 1295 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1295:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::array<int, 5> >::value_type&&’ {aka ‘std::array<int, 5>&&’} 1295 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ answer.code:164:28: error: no matching function for call to ‘std::vector<std::array<int, 5> >::push_back(<brace-enclosed initializer list>)’ 164 | v.push_back({1, i, j, 3-i, 3-j}); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 5>; _Alloc = std::allocator<std::array<int, 5> >; value_type = std::array<int, 5>]’ 1278 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1278:35: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::array<int, 5> >::value_type&’ {aka ‘const std::array<int, 5>&’} 1278 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::array<int, 5>; _Alloc = std::allocator<std::array<int, 5> >; value_type = std::array<int, 5>]’ 1295 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:1295:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::array<int, 5> >::value_type&&’ {aka ‘std::array<int, 5>&&’} 1295 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ answer.code:175:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 175 | for(auto [op, x, y, x2, y2]: res) | ^ answer.code:175:14: error: deduced type ‘std::array<int, 5>’ for ‘<structured bindings>’ is incomplete 175 | for(auto [op, x, y, x2, y2]: res) | ^~~~~~~~~~~~~~~~~~ In file included from answer.code:3: /usr/include/c++/13/tuple:2005:45: note: declaration of ‘struct std::array<int, 5>’ 2005 | template<typename _Tp, size_t _Nm> struct array; | ^~~~~ answer.code:189:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 189 | for(auto [x, y]: ans) cout << x << " " << y << endl; | ^ /usr/include/c++/13/bits/stl_vector.h: In instantiation of ‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::array<int, 5>; _Alloc = std::allocator<std::array<int, 5> >]’: /usr/include/c++/13/bits/stl_vector.h:528:7: required from here /usr/include/c++/13/bits/stl_vector.h:367:49: error: invalid use of incomplete type ‘struct std::array<int, 5>’ 367 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/13/tuple:2005:45: note: declaration of ‘struct std::array<int, 5>’ 2005 | template<typename _Tp, size_t _Nm> struct array; | ^~~~~ In file included from /usr/include/c++/13/vector:72: /usr/include/c++/13/bits/vector.tcc: In instantiation of ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<...