• + 1 comment

    Can be done in O(T*sqrt(N)*K)...