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_32286191_9115.cpp: In function 'int rmq(int, int)':
0_0_32286191_9115.cpp:2:26: error: 'log' was not declared in this scope
     int k=(int) log(r-l+1)/log(2);
                          ^
0_0_32286191_9115.cpp:3:9: error: redeclaration of 'int k'
     int k=log(r-l+1)/log(2);
         ^
0_0_32286191_9115.cpp:2:9: note: 'int k' previously declared here
     int k=(int) log(r-l+1)/log(2);
         ^
0_0_32286191_9115.cpp:4:16: error: 'dp' was not declared in this scope
     return max(dp[l][k],dp[r-(1<<k)+1][k]);
                ^
0_0_32286191_9115.cpp:4:42: error: 'max' was not declared in this scope
     return max(dp[l][k],dp[r-(1<<k)+1][k]);
                                          ^


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-05-26 05:12:25, Gzip enabled