虽然原题时限为 2s,但 O(RC)\mathcal{O}(RC)O(RC) 的时间复杂度足以通过本题目。
另外,其他题解的复杂度为 O(RCK)\mathcal{O}(RCK)O(RCK) 甚至 O(RCK2)\mathcal{O}(RCK^2)O(RCK2)。