F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38544461_31029.cpp: In function 'void solve(int, int)':
0_0_38544461_31029.cpp:15:16: error: expected unqualified-id before '[' token
     for (auto &[x1, y1, x2, y2] : tun) {
                ^
0_0_38544461_31029.cpp:15:16: error: expected ';' before '[' token
0_0_38544461_31029.cpp:15:17: error: 'x1' was not declared in this scope
     for (auto &[x1, y1, x2, y2] : tun) {
                 ^
0_0_38544461_31029.cpp:15:21: error: 'y1' was not declared in this scope
     for (auto &[x1, y1, x2, y2] : tun) {
                     ^
0_0_38544461_31029.cpp:15:25: error: 'x2' was not declared in this scope
     for (auto &[x1, y1, x2, y2] : tun) {
                         ^
0_0_38544461_31029.cpp:15:29: error: 'y2' was not declared in this scope
     for (auto &[x1, y1, x2, y2] : tun) {
                             ^
0_0_38544461_31029.cpp: In lambda function:
0_0_38544461_31029.cpp:15:33: error: expected '{' before ':' token
     for (auto &[x1, y1, x2, y2] : tun) {
                                 ^
0_0_38544461_31029.cpp: In function 'void solve(int, int)':
0_0_38544461_31029.cpp:15:33: error: expected ';' before ':' token
0_0_38544461_31029.cpp:15:33: error: expected primary-expression before ':' token
0_0_38544461_31029.cpp:15:33: error: expected ')' before ':' token
0_0_38544461_31029.cpp:15:33: error: expected primary-expression before ':' token
0_0_38544461_31029.cpp:20:17: error: missing template arguments before 'dis'
     std::vector dis(M, std::vector<int>(M, 1E9));
                 ^
0_0_38544461_31029.cpp:22:14: error: expected unqualified-id before '[' token
         auto [x1, y1, x2, y2] = tun[i];
              ^
0_0_38544461_31029.cpp:23:21: error: missing template arguments before 'd'
         std::vector d(N, std::vector<int>(N, 1E9));
                     ^
0_0_38544461_31029.cpp:25:9: error: 'd' was not declared in this scope
         d[x2][y2] = 0;
         ^
0_0_38544461_31029.cpp:25:11: error: 'x2' was not declared in this scope
         d[x2][y2] = 0;
           ^
0_0_38544461_31029.cpp:25:15: error: 'y2' was not declared in this scope
         d[x2][y2] = 0;
               ^
0_0_38544461_31029.cpp:26:30: error: no matching function for call to 'std::set<std::array<int, 3ull> >::insert(<brace-enclosed initializer list>)'
         st.insert({0, x2, y2});
                              ^
0_0_38544461_31029.cpp:26:30: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:86,
                 from 0_0_38544461_31029.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3ull>; _Compare = std::less<std::array<int, 3ull> >; _Alloc = std::allocator<std::array<int, 3ull> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::value_type = std::array<int, 3ull>]
       insert(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::array<int, 3ull>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::array<int, 3ull>; _Compare = std::less<std::array<int, 3ull> >; _Alloc = std::allocator<std::array<int, 3ull> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::value_type = std::array<int, 3ull>]
       insert(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:508:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::array<int, 3ull> >::value_type&& {aka std::array<int, 3ull>&&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = std::array<int, 3ull>; _Compare = std::less<std::array<int, 3ull> >; _Alloc = std::allocator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::value_type = std::array<int, 3ull>]
       insert(const_iterator __position, const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:536:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::array<int, 3ull>; _Compare = std::less<std::array<int, 3ull> >; _Alloc = std::allocator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::value_type = std::array<int, 3ull>]
       insert(const_iterator __position, value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:541:7: note:   candidate expects 2 arguments, 1 provided
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note: template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = std::array<int, 3ull>; _Compare = std::less<std::array<int, 3ull> >; _Alloc = std::allocator<std::array<int, 3ull> >]
  insert(_InputIterator __first, _InputIterator __last)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:556:2: note:   template argument deduction/substitution failed:
0_0_38544461_31029.cpp:26:30: note:   candidate expects 2 arguments, 1 provided
         st.insert({0, x2, y2});
                              ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:86,
                 from 0_0_38544461_31029.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:568:7: note: void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::array<int, 3ull>; _Compare = std::less<std::array<int, 3ull> >; _Alloc = std::allocator<std::array<int, 3ull> >]
       insert(initializer_list<value_type> __l)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:568:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 3ull> >'
0_0_38544461_31029.cpp:28:18: error: expected unqualified-id before '[' token
             auto [v, x, y] = *st.begin();
                  ^
0_0_38544461_31029.cpp:32:26: error: 'x' was not declared in this scope
                 int nx = x + dx[k];
                          ^
0_0_38544461_31029.cpp:33:26: error: 'y' was not declared in this scope
                 int ny = y + dy[k];
                          ^
0_0_38544461_31029.cpp:34:95: error: 'v' was not declared in this scope
                 if (nx >= 0 && nx < N && ny >= 0 && ny < N && s[nx][ny] != '#' && d[nx][ny] > v + 1) {
                                                                                               ^
0_0_38544461_31029.cpp:36:46: error: no matching function for call to 'std::set<std::array<int, 3ull> >::insert(<brace-enclosed initializer list>)'
                     st.insert({v + 1, nx, ny});
                                              ^
0_0_38544461_31029.cpp:36:46: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:86,
                 from 0_0_38544461_31029.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:499:7: note: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::array<int, 3ull>; _Compare = std::less<std::array<int, 3ull> >; _Alloc = std::allocator<std::array<int, 3ull> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::array<int, 3ull> >; std::set<_Key, _Compare, _Alloc>::value_type = std::array<int, 3ull>]
       insert(c


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 18:05:49, Gzip enabled