Stay Hungry,Stay Foolish!

摘要: E - Kth Takoyaki Set https://atcoder.jp/contests/abc297/tasks/abc297_e 思路 使用优先队列,从0 开始, 对所有可能的扩展,计算累加和, 添加到队列, 每次从队列取出最小值,直到取出第k个。 Code #include <ioma 阅读全文
posted @ 2023-04-09 22:13 lightsong 阅读(66) 评论(0) 推荐(0) 编辑
摘要: D - Count Subtractions https://atcoder.jp/contests/abc297/tasks/abc297_d 思路 按照题目给的逻辑会超时。 需要使用 除法来优化算法。 Code #include <iomanip> #include <bits/stdc++.h 阅读全文
posted @ 2023-04-09 22:10 lightsong 阅读(20) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel