Updated main.cpp with description

TODO: Extract RMQ.