A. City Wall

一圈一圈绕。


B. Domino Colorings


C. Сounterquestion

枚举 permutation 后 \(O(len)\) 地 check。


D. Galaxy Center

  • 同一层至多经过一个点。
  • 可能 vis 的点不会太多,枚举在哪个点相遇。

E. IBM 1403

预处理序列自动机,即可求 \(O(|s|)\) 出当前时间 t 下,打印字符串 s 的时间。


F. Line Tracing


G. The Queen and the Knight


H. Product of Roots


I. Safe Landing

如果两个维度都变化了,那倒着走回去即可,否则 -1


J. Perfect Square

选一些质数 p,检验一下 x%p 是否为模 p 的二次剩余。

相关文章:

  • 2022-12-23
  • 2022-02-18
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-05
  • 2021-08-07
  • 2021-05-31
  • 2021-09-05
  • 2021-09-03
  • 2021-11-15
  • 2022-12-23
相关资源
相似解决方案