Stay Hungry,Stay Foolish!

摘要: D - Redistribution https://atcoder.jp/contests/abc178/tasks/abc178_d 思路 设f[i]:表示用3~i数凑出和为i的方案数 f[i]=f[i-3]+f[i-4]+f[i-5]+…+f[i-i] https://blog.csdn.ne 阅读全文
posted @ 2023-03-05 22:35 lightsong 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1009. K-based Numbers https://acm.timus.ru/problem.aspx?space=1&num=1009 思路 典型dp问题 对于n位k位底的数, 求不存在连续0出现的数目。 设f(i) 为 i位,最后一位为不为0的数目 设g(i)为i位,最后一位为0的数目 阅读全文
posted @ 2023-03-05 22:31 lightsong 阅读(13) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel