Hi, just got done upsolving this problem: https://codeforces.net/problemset/problem/1360/F,
and it was surprising to me that the problem had such small values of n and m (<= 10). I was curious if this problem can still be solved in better than O(n * m * |ALPH|), in cases where the constraints are larger?
Thanks!