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_32937789_8740.cpp:10:1: error: expected ',' or ';' before 'int'
 int h[N],e[M],ne[M],idx,dis[M],vis[M];
 ^
0_0_32937789_8740.cpp: In function 'void add(int, int)':
0_0_32937789_8740.cpp:13:2: error: 'e' was not declared in this scope
  e[idx]=y,ne[idx]=h[x],h[x]=idx++;
  ^
0_0_32937789_8740.cpp:13:4: error: 'idx' was not declared in this scope
  e[idx]=y,ne[idx]=h[x],h[x]=idx++;
    ^
0_0_32937789_8740.cpp:13:11: error: 'ne' was not declared in this scope
  e[idx]=y,ne[idx]=h[x],h[x]=idx++;
           ^
0_0_32937789_8740.cpp:13:19: error: 'h' was not declared in this scope
  e[idx]=y,ne[idx]=h[x],h[x]=idx++;
                   ^
0_0_32937789_8740.cpp: In function 'int dijkstra(int, int)':
0_0_32937789_8740.cpp:18:2: error: 'dis' was not declared in this scope
  dis[a]=0;
  ^
0_0_32937789_8740.cpp:26:6: error: 'vis' was not declared in this scope
   if(vis[idx]) continue;
      ^
0_0_32937789_8740.cpp:27:3: error: 'vis' was not declared in this scope
   vis[idx]=1;
   ^
0_0_32937789_8740.cpp:28:13: error: 'h' was not declared in this scope
   for(int i=h[idx];i!=-1;i=ne[i])
             ^
0_0_32937789_8740.cpp:28:28: error: 'ne' was not declared in this scope
   for(int i=h[idx];i!=-1;i=ne[i])
                            ^
0_0_32937789_8740.cpp:30:10: error: 'e' was not declared in this scope
    int j=e[i];
          ^
0_0_32937789_8740.cpp:33:22: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)'
     q.push({dis[j],j}),vis[j]=1;
                      ^
0_0_32937789_8740.cpp:33:22: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from 0_0_32937789_8740.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:499:7: note: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
       push(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:499: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:507:7: note: void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
       push(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:507:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&& {aka std::pair<int, int>&&}'
0_0_32937789_8740.cpp: In function 'int main()':
0_0_32937789_8740.cpp:48:10: error: 'h' was not declared in this scope
   memset(h,-1,sizeof h);
          ^
0_0_32937789_8740.cpp:49:10: error: 'dis' was not declared in this scope
   memset(dis,0x3f,sizeof dis);
          ^
0_0_32937789_8740.cpp:50:10: error: 'vis' was not declared in this scope
   memset(vis,0,sizeof vis);
          ^


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-10-06 23:00:19, Gzip enabled