How to solve KQUERY from spoj using mos algorithm?