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_20910244_22919.cpp:15:14: error: 'int log2 [80010]' redeclared as different kind of symbol
 int log2[MAXN],pow2[30];
              ^
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_20910244_22919.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:638:25: note: previous declaration 'double log2(double)'
   extern double __cdecl log2 (double);
                         ^
0_0_20910244_22919.cpp: In function 'void yuchuli()':
0_0_20910244_22919.cpp:31:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  for(i = 1;i <= log2[n];i ++)
                       ^
0_0_20910244_22919.cpp: In function 'int lca(int, int)':
0_0_20910244_22919.cpp:40:16: error: invalid conversion from 'double (*)(double)' to 'int' [-fpermissive]
  for(i = log2[n];i >= 0;i --)
                ^
0_0_20910244_22919.cpp:44:16: error: invalid conversion from 'double (*)(double)' to 'int' [-fpermissive]
  for(i = log2[n];i >= 0;i --)
                ^
0_0_20910244_22919.cpp: In function 'int main()':
0_0_20910244_22919.cpp:71:10: error: assignment of function 'double log2(double)'
  log2[0] = -1,pow2[0] = 1;
          ^
0_0_20910244_22919.cpp:71:10: error: cannot convert 'int' to 'double(double)' in assignment
0_0_20910244_22919.cpp:72:39: error: assignment of read-only location '*(log2 + ((sizetype)i))'
  for(int i = 1;i <= MAXN;i ++)log2[i] = log2[i >> 1] + 1;
                                       ^
0_0_20910244_22919.cpp:72:39: error: cannot convert 'double (*)(double)' to 'double(double)' in assignment


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-11-27 00:55:06, Gzip enabled