The ordered min window query problem is solved with O(n x m) time, which is not so good.