Compile Error

/in/foo.cc: In function 'void Unweighted(int, int, int*, int*)':
/in/foo.cc:16:24: error: reference to 'map' is ambiguous
    if(dist[i] == -1 && map[v][i])
                        ^~~
/in/foo.cc:3:5: note: candidates are: int map [10086][10086]
 int map[10086][10086];
     ^~~
In file included from /usr/include/c++/6/map:61:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:81,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_map.h:96:11: note:                 template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map
     class map
           ^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:27:19: error: 'Maxsize' was not declared in this scope
  int N,i = 0,dist[Maxsize],path[Maxsize],yuandian = -1;
                   ^~~~~~~
/in/foo.cc:31:18: error: 'v' was not declared in this scope
   scanf("%d %d",&v,&w);
                  ^
/in/foo.cc:31:21: error: 'w' was not declared in this scope
   scanf("%d %d",&v,&w);
                     ^
/in/foo.cc:32:3: error: reference to 'map' is ambiguous
   map[v][w] = 1;
   ^~~
/in/foo.cc:3:5: note: candidates are: int map [10086][10086]
 int map[10086][10086];
     ^~~
In file included from /usr/include/c++/6/map:61:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:81,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_map.h:96:11: note:                 template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map
     class map
           ^~~
/in/foo.cc:33:3: error: reference to 'map' is ambiguous
   map[w][v] = 1;
   ^~~
/in/foo.cc:3:5: note: candidates are: int map [10086][10086]
 int map[10086][10086];
     ^~~
In file included from /usr/include/c++/6/map:61:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:81,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_map.h:96:11: note:                 template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map
     class map
           ^~~
/in/foo.cc:34:3: error: 'dist' was not declared in this scope
   dist[i] = -1;
   ^~~~
/in/foo.cc:35:3: error: 'path' was not declared in this scope
   path[i] = -1;
   ^~~~
/in/foo.cc:39:2: error: 'dist' was not declared in this scope
  dist[yuandian] = 0;
  ^~~~
/in/foo.cc:40:29: error: 'path' was not declared in this scope
  Unweighted(yuandian,N,dist,path);
                             ^~~~

信息

递交者
类型
递交
题目
P1027 打包
语言
C++
递交时间
2024-04-20 11:29:56
评测时间
2024-04-20 11:29:56
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes