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_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
    9 | vector<vector<pair<int, int> > >p;
      |        ^~~~~~
0_0_39236221_28274.cpp:6:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
    5 | #include <map>
  +++ |+#include <vector>
    6 | using namespace std;
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
    9 | vector<vector<pair<int, int> > >p;
      |        ^~~~~~
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:8: error: 'vector' was not declared in this scope
0_0_39236221_28274.cpp:9:8: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:9:1: error: 'vector' does not name a type
    9 | vector<vector<pair<int, int> > >p;
      | ^~~~~~
0_0_39236221_28274.cpp:13:19: error: 'vector' has not been declared
   13 | void bfs ( int i, vector<pair<int, int> >lq, int d ) {
      |                   ^~~~~~
0_0_39236221_28274.cpp:13:25: error: expected ',' or '...' before '<' token
   13 | void bfs ( int i, vector<pair<int, int> >lq, int d ) {
      |                         ^
0_0_39236221_28274.cpp: In function 'void bfs(int, int)':
0_0_39236221_28274.cpp:14:14: error: 'd' was not declared in this scope
   14 |         if ( d == 6 ) return;
      |              ^
0_0_39236221_28274.cpp:15:9: error: 'vector' was not declared in this scope
   15 |         vector<pair<int, int> >q;
      |         ^~~~~~
0_0_39236221_28274.cpp:15:9: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:15:31: error: expected primary-expression before '>' token
   15 |         vector<pair<int, int> >q;
      |                               ^
0_0_39236221_28274.cpp:15:32: error: 'q' was not declared in this scope
   15 |         vector<pair<int, int> >q;
      |                                ^
0_0_39236221_28274.cpp:16:27: error: 'lq' was not declared in this scope; did you mean 'lqi'?
   16 |         for ( auto &lqi : lq ) {
      |                           ^~
      |                           lqi
0_0_39236221_28274.cpp:18:27: error: 'y' was not declared in this scope
   18 |                 if ( a[x][y] > 1 ) {
      |                           ^
0_0_39236221_28274.cpp:19:36: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and '<brace-enclosed initializer list>')
   19 |                         int ti = mp[ {x, y}];
      |                                    ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/map:63,
                 from 0_0_39236221_28274.cpp:5:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; mapped_type = int; key_type = std::pair<int, int>]'
  502 |       operator[](const key_type& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:502:34: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::map<std::pair<int, int>, int>::key_type&' {aka 'const std::pair<int, int>&'}
  502 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; mapped_type = int; key_type = std::pair<int, int>]'
  522 |       operator[](key_type&& __k)
      |       ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_map.h:522:29: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, int>::key_type&&' {aka 'std::pair<int, int>&&'}
  522 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
0_0_39236221_28274.cpp:20:30: error: 'd' was not declared in this scope
   20 |                         if ( d ) {
      |                              ^
0_0_39236221_28274.cpp:21:33: error: 'p' was not declared in this scope
   21 |                                 p[i].push_back ( {ti, d} );
      |                                 ^
0_0_39236221_28274.cpp:25:39: error: 'y' was not declared in this scope
   25 |                 if ( x && used[x - 1][y] == 0 && a[x - 1][y] != 0 ) {
      |                                       ^
0_0_39236221_28274.cpp:29:22: error: 'y' was not declared in this scope
   29 |                 if ( y && used[x][y - 1] == 0 && a[x][y - 1] != 0 ) {
      |                      ^
0_0_39236221_28274.cpp:33:47: error: 'y' was not declared in this scope
   33 |                 if ( x < n - 1 && used[x + 1][y] == 0 && a[x + 1][y] != 0 ) {
      |                                               ^
0_0_39236221_28274.cpp:37:43: error: 'y' was not declared in this scope
   37 |                 if ( y < m - 1 && used[x][y + 1] == 0 && a[x][y + 1] != 0 ) {
      |                                           ^
0_0_39236221_28274.cpp:42:21: error: 'd' was not declared in this scope
   42 |         bfs ( i, q, d + 1 );
      |                     ^
0_0_39236221_28274.cpp: In function 'int main()':
0_0_39236221_28274.cpp:52:17: error: 'p' was not declared in this scope
   52 |                 p.clear();
      |                 ^
0_0_39236221_28274.cpp:71:17: error: 'vector' was not declared in this scope
   71 |                 vector<pair<int, int> >ptmp ( 1 );
      |                 ^~~~~~
0_0_39236221_28274.cpp:71:17: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
0_0_39236221_28274.cpp:71:39: error: expected primary-expression before '>' token
   71 |                 vector<pair<int, int> >ptmp ( 1 );
      |                                       ^
0_0_39236221_28274.cpp:71:40: error: 'ptmp' was not declared in this scope; did you mean 'tm'?
   71 |                 vector<pair<int, int> >ptmp ( 1 );
      |                                        ^~~~
      |                                        tm


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-12 06:06:45, Gzip enabled