Stay Hungry,Stay Foolish!

摘要: D - Flip Cards https://atcoder.jp/contests/abc291/tasks/abc291_d 思路 动态规划思想 初始设置, 表示第一个位置, a 和 b各有一种选择 an[1] = 1 bn[1] = 1 后面使用递推式: an[i] += an[i-1] if 阅读全文
posted @ 2023-02-26 22:54 lightsong 阅读(74) 评论(0) 推荐(0) 编辑
摘要: D - Marking https://atcoder.jp/contests/abc290/tasks/abc290_d 思路 https://zhuanlan.zhihu.com/p/607818729 x即为最小循环节的长度 即经过x次mark, mark的位置又回到了 0 位置。 如下为x最 阅读全文
posted @ 2023-02-26 17:49 lightsong 阅读(28) 评论(0) 推荐(1) 编辑
Life Is Short, We Need Ship To Travel