0_0_32286194_30173.cpp: In function 'int rmq(int, int)': 0_0_32286194_30173.cpp:18:9: error: redeclaration of 'int k' int k=log(r-l+1)/log(2); ^ 0_0_32286194_30173.cpp:17:9: note: 'int k' previously declared here int k=(int) log(r-l+1)/log(2); ^