/ Vijos /

记录详情

Compile Error

foo.cpp:29:27: error: 'int log [600001]' redeclared as different kind of symbol
 int n, m, log[MAXN * 2 + 1], max, eulerTourLen;
                           ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
c:\mingw\include\math.h:159:24: error: previous declaration of 'double log(double)'
 _CRTIMP double __cdecl log (double);
                        ^
foo.cpp: In function 'void sparseTable()':
foo.cpp:74:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         log[i] = x - 1;
              ^
foo.cpp:74:16: error: assignment of read-only location '*(log + ((sizetype)i))'
         log[i] = x - 1;
                ^
foo.cpp:74:16: error: cannot convert 'int' to 'double(double)' in assignment
foo.cpp: In function 'Node* rmq(int, int)':
foo.cpp:80:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         const int t = log[r - l];
                                ^
foo.cpp:80:32: error: invalid conversion from 'double (__attribute__((__cdecl__)) *)(double)' to 'int' [-fpermissive]

信息

递交者
类型
递交
题目
P1983 运输计划
语言
C++
递交时间
2016-10-31 09:49:33
评测时间
2016-10-31 09:49:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes