Stay Hungry,Stay Foolish!

摘要: B - Buy One Carton of Milk https://atcoder.jp/contests/abc331/tasks/abc331_b 思路 dfs递归搜索, 按照依此按照三种策略: 6个一打 - cost S 8个一打 - cost M 12个一打 - cost L 递归到叶子节 阅读全文
posted @ 2023-12-04 22:21 lightsong 阅读(38) 评论(0) 推荐(0) 编辑
摘要: C - Sum of Numbers Greater Than Me https://atcoder.jp/contests/abc331/tasks/abc331_c 思路 由于 值 可以是重复的, 需要记录每出现的值 对应的位置 , 记录在 map<int, vector<int>> valpo 阅读全文
posted @ 2023-12-04 22:16 lightsong 阅读(5) 评论(0) 推荐(0) 编辑
摘要: E - Set Meal https://atcoder.jp/contests/abc331/tasks/abc331_e 思路 定义 vector<int> v[100005]; 对于 c d 对进行group操作, 得到每个ai dish 对应不可能的 bj dish的cost值的集合 对b 阅读全文
posted @ 2023-12-04 22:07 lightsong 阅读(7) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel