Stay Hungry,Stay Foolish!

摘要: E - Alphabet Tiles https://atcoder.jp/contests/abc358/tasks/abc358_e 思路 dp[i][j] 前i项组成j长度字符串的 方案总数。 状态转移为: dp[i-1][j] * combination[j+l][l] > dp[i][j+ 阅读全文
posted @ 2024-06-17 23:40 lightsong 阅读(2) 评论(0) 推荐(0) 编辑
摘要: D - Souvenirs https://atcoder.jp/contests/abc358/tasks/abc358_d 思路 贪心算法。 把a数组和b数组从小到大排序。 遍历b数组的每一个元素bi, 在a数组中找到第一个大于等于bi元素,累加值。 Code https://atcoder.j 阅读全文
posted @ 2024-06-17 13:27 lightsong 阅读(2) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel