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_38336572_30079.cpp: In function 'void solve()':
0_0_38336572_30079.cpp:48:18: error: expected unqualified-id before '[' token
             auto [x,y]=q.front();q.pop();
                  ^
0_0_38336572_30079.cpp:49:16: error: 'x' was not declared in this scope
             if(x==tx&&y==ty)
                ^
0_0_38336572_30079.cpp:49:23: error: 'y' was not declared in this scope
             if(x==tx&&y==ty)
                       ^
0_0_38336572_30079.cpp:56:24: error: 'x' was not declared in this scope
                 int nx=x+dx[i],ny=y+dy[i];
                        ^
0_0_38336572_30079.cpp:58:32: error: 'ny' was not declared in this scope
                 if(nx<1||nx>n||ny<1||ny>m||grid[nx][ny]==1||st2[nx][ny]) continue;
                                ^
0_0_38336572_30079.cpp:59:34: error: 'nny' was not declared in this scope
                 if(nnx<1||nnx>n||nny<1||nny>m||grid[nnx][nny]==1) continue;
                                  ^
0_0_38336572_30079.cpp:60:28: error: 'ny' was not declared in this scope
                 q.push({nx,ny});
                            ^
0_0_38336572_30079.cpp:60:31: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)'
                 q.push({nx,ny});
                               ^
0_0_38336572_30079.cpp:60:31: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:85,
                 from 0_0_38336572_30079.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:215:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]
       push(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:215:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:220:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>]
       push(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:220:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::queue<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}'


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-23 09:06:17, Gzip enabled