/ Vijos /

记录详情

Compile Error

/in/foo.cc:6:55: error: 'int index [200000]' redeclared as different kind of symbol
 int block[20000],n,m,aa,b,tot=1,start,end,index[200000],dist[20000],vis[20000],que[20000],conv_index[200000];
                                                       ^
In file included from /usr/include/c++/6/cstring:42:0,
                 from /in/foo.cc:3:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
 index (const char *__s, int __c) __THROW
 ^~~~~
/in/foo.cc: In function 'void spfa(int)':
/in/foo.cc:22:16: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   ind = index[x];
                ^
/in/foo.cc:14:10: warning: unused variable 'np' [-Wunused-variable]
  int ind,np,x,i,head=0,tail=1,vv;
          ^~
/in/foo.cc:14:15: warning: unused variable 'i' [-Wunused-variable]
  int ind,np,x,i,head=0,tail=1,vv;
               ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:69:27: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   edg[tot].next = index[aa];
                           ^
/in/foo.cc:70:31: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   conv_edg[tot].next = index[b];
                               ^
/in/foo.cc:72:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   index[aa] = tot;
           ^
/in/foo.cc:79:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    if(index[i] == 0 && i!= end)
              ^

信息

递交者
类型
递交
题目
P1909 寻找道路
语言
C++
递交时间
2017-08-02 14:55:40
评测时间
2017-08-02 14:55:40
评测机
分数
0
总耗时
207ms
峰值内存
27.738 MiB