Update rmq.cpp

Fixed some codes and added query subroutine