/ Vijos /

记录详情

Compile Error

foo.cpp:76:21: error: invalid suffix "MAXNMAXN" on integer constant
 }edges[MAXN4],edgep[16MAXNMAXN],allo=edgep;
                     ^
foo.cpp:1:1: error: 'include' does not name a type
 include <iostream>
 ^
foo.cpp:12:1: error: 'define' does not name a type
 define MAXN 105
 ^
foo.cpp:36:15: error: 'istream' does not name a type
 inline friend istream& operator >> (istream &is, Point &rhs)
               ^
foo.cpp:41:15: error: 'ostream' does not name a type
 inline friend ostream& operator << (ostream &os, Point &rhs)
               ^
foo.cpp:46:8: error: 'MAXN' was not declared in this scope
 }input[MAXN][4],a[2],b[2];
        ^
foo.cpp: In function 'double Abs(const Point&)':
foo.cpp:49:25: error: expected primary-expression before 'double'
 return sqrt((double)x.X(double)x.X+(double)x.Y(double)x.Y);
                         ^
foo.cpp:49:31: error: expression cannot be used as a function
 return sqrt((double)x.X(double)x.X+(double)x.Y(double)x.Y);
                               ^
foo.cpp:49:58: error: 'sqrt' was not declared in this scope
 return sqrt((double)x.X(double)x.X+(double)x.Y(double)x.Y);
                                                          ^
foo.cpp: In function 'void FindFour(const char&)':
foo.cpp:60:14: warning: array subscript has type 'char' [-Wchar-subscripts]
         a[idx]=input[index][j]-input[index][i];
              ^
foo.cpp:60:16: error: 'input' was not declared in this scope
         a[idx]=input[index][j]-input[index][i];
                ^
foo.cpp:61:16: warning: array subscript has type 'char' [-Wchar-subscripts]
         b[idx++]=input[index][j];
                ^
foo.cpp:65:9: error: 'input' was not declared in this scope
         input[index][3]=b[0]+b[1]-input[index][i];
         ^
foo.cpp: At global scope:
foo.cpp:75:6: error: field 'next' has incomplete type
 edge next;
      ^
foo.cpp:76:8: error: 'MAXN4' was not declared in this scope
 }edges[MAXN4],edgep[16MAXNMAXN],allo=edgep;
        ^
foo.cpp:76:38: error: 'edgep' was not declared in this scope
 }edges[MAXN4],edgep[16MAXNMAXN],allo=edgep;
                                      ^
foo.cpp: In function 'void add_edge(const short int&, const short int&, const double&)':
foo.cpp:80:5: error: base operand of '->' has non-pointer type 'edge'
 allo->to=to;
     ^
foo.cpp:81:5: error: base operand of '->' has non-pointer type 'edge'
 allo->weight=weight;
     ^
foo.cpp:82:5: error: base operand of '->' has non-pointer type 'edge'
 allo->next=edges[from];
     ^
foo.cpp:82:12: error: 'edges' was not declared in this scope
 allo->next=edges[from];
            ^
foo.cpp:83:17: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
 edges[from]=allo++;
                 ^
foo.cpp: In function 'void MakeInnerGraph(const short int&)':
foo.cpp:88:58: error: 'input' was not declared in this scope
 for(char i=0;i<3;i++) { for(char j=i+1;j<4;j++) { _d=Abs(input[index][j]-input[index][i])*(double)train; add_edge(index*4+i,index*4+j,_d); add_edge(index*4+j,index*4+i,_d);; } } } void MakeOuterGraph(const short &index) { for(char i=0;(++i)<index;) { for(char j=0;j<4;j++) { for(char k=0;k<4;k++) { _d=Abs(input[index][k]-input[i][j])*(double)t; add_edge(index*4+k,i*4+j,_d); add_edge(i*4+j,index*4+k,_d); } } } } double dist[MAXN*4]; queue<short> q;
                                                          ^
foo.cpp: In function 'void MakeOuterGraph(const short int&)':
foo.cpp:88:307: error: 'input' was not declared in this scope
 for(char i=0;i<3;i++) { for(char j=i+1;j<4;j++) { _d=Abs(input[index][j]-input[index][i])*(double)train; add_edge(index*4+i,index*4+j,_d); add_edge(index*4+j,index*4+i,_d);; } } } void MakeOuterGraph(const short &index) { for(char i=0;(++i)<index;) { for(char j=0;j<4;j++) { for(char k=0;k<4;k++) { _d=Abs(input[index][k]-input[i][j])*(double)t; add_edge(index*4+k,i*4+j,_d); add_edge(i*4+j,index*4+k,_d); } } } } double dist[MAXN*4]; queue<short> q;

信息

递交者
类型
递交
题目
P1119 Car的旅行路线
语言
C++
递交时间
2016-06-22 12:47:21
评测时间
2016-06-22 12:47:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes