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_21711746_23296.cpp:21:55: error: 'int pow [18]' redeclared as different kind of symbol
 int Min[N << 1][18], MinId[N << 1][18], pos[N], pow[18], log[N << 1];
                                                       ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_21711746_23296.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:151:18: note: previous declaration 'double pow(double, double)'
   double __cdecl pow(double _X,double _Y);
                  ^
0_0_21711746_23296.cpp:21:68: error: 'int log [200010]' redeclared as different kind of symbol
 int Min[N << 1][18], MinId[N << 1][18], pos[N], pow[18], log[N << 1];
                                                                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_21711746_23296.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:149:18: note: previous declaration 'double log(double)'
   double __cdecl log(double _X);
                  ^
0_0_21711746_23296.cpp: In function 'void RMQ()':
0_0_21711746_23296.cpp:74:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    if (i + pow[k] - 1 <= dfs_clock) {
                          ^
0_0_21711746_23296.cpp:75:43: error: invalid types 'int [200010][18][double (*)(double, double)]' for array subscript
     if (Min[i][k - 1] < Min[i + pow[k - 1]][k - 1]) Min[i][k] = Min[i][k - 1], MinId[i][k] = MinId[i][k - 1];
                                           ^
0_0_21711746_23296.cpp:76:40: error: invalid types 'int [200010][18][double (*)(double, double)]' for array subscript
     else Min[i][k] = Min[i + pow[k - 1]][k - 1], MinId[i][k] = MinId[i + pow[k - 1]][k - 1];
                                        ^
0_0_21711746_23296.cpp:76:84: error: invalid types 'int [200010][18][double (*)(double, double)]' for array subscript
     else Min[i][k] = Min[i + pow[k - 1]][k - 1], MinId[i][k] = MinId[i + pow[k - 1]][k - 1];
                                                                                    ^
0_0_21711746_23296.cpp: In function 'int LCA(int, int)':
0_0_21711746_23296.cpp:82:23: error: invalid conversion from 'double (*)(double)' to 'int' [-fpermissive]
  int k = log[y - x + 1]; y = y - pow[k] + 1;
                       ^
0_0_21711746_23296.cpp:82:39: error: invalid operands of types 'int' and 'double(double, double)' to binary 'operator-'
  int k = log[y - x + 1]; y = y - pow[k] + 1;
                                       ^
0_0_21711746_23296.cpp: In function 'int main()':
0_0_21711746_23296.cpp:158:9: error: assignment of function 'double pow(double, double)'
  pow[0] = 1;
         ^
0_0_21711746_23296.cpp:158:9: error: cannot convert 'int' to 'double(double, double)' in assignment
0_0_21711746_23296.cpp:159:54: error: invalid operands of types 'double(double, double)' and 'int' to binary 'operator<<'
  for (int i = 1; i < 18; ++i) pow[i] = pow[i - 1] << 1;
                                                      ^
0_0_21711746_23296.cpp:160:9: error: assignment of function 'double log(double)'
  log[0] = -1;
         ^
0_0_21711746_23296.cpp:160:9: error: cannot convert 'int' to 'double(double)' in assignment
0_0_21711746_23296.cpp:161:38: error: assignment of read-only location '*(log + ((sizetype)i))'
  for (int i = 1; i <= A; ++i) log[i] = log[i >> 1] + 1;
                                      ^
0_0_21711746_23296.cpp:161:38: error: cannot convert 'double (*)(double)' to 'double(double)' in assignment


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-02-18 16:14:14, Gzip enabled