Stay Hungry,Stay Foolish!

摘要: D - Intersecting Intervals 思路 对于区间重合问题, 经典做法 对 left 进行排序, 然后进行统计计数。 写了一版TLE,反思有冗余计数问题。 计算每一个区间的覆盖数目, 不需要TLE版本逐个往后数, 只需要使用lower_bound找出第一个大于等于 ri + 1 的 阅读全文
posted @ 2024-05-25 23:04 lightsong 阅读(78) 评论(0) 推荐(0) 编辑
摘要: C - Bingo 2 https://atcoder.jp/contests/abc355/tasks/abc355_c 思路 统计每行元素个数 统计每列元素个数 统计两个对角线的元素个数 任意一个达到n,则满足条件 Code https://atcoder.jp/contests/abc355/ 阅读全文
posted @ 2024-05-25 22:55 lightsong 阅读(24) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel