随笔分类 - 区间问题
摘要:题目链接 Gildong owns a bulgogi restaurant. The restaurant has a lot of customers, so many of them like to make a reservation before visiting it. Gildong
阅读全文
摘要:(https://www.acwing.com/problem/content/805/) 给定 nn 个区间 [li,ri][li,ri],要求合并所有有交集的区间。 注意如果在端点处相交,也算有交集。 输出合并完成后的区间个数。 例如:[1,3]和[2,6]可以合并为一个区间[1,6]。 输入格
阅读全文
摘要:https://atcoder.jp/contests/abc133/tasks/abc133_c 思路:由于L,R区间太大,所以不能暴力枚举。由于求(i*j)%2019的最小值,那么2019的倍数对2019求余则为零。 1.如果L/2019和R/2019一样说明,L和R之间没有2019的倍数,那么
阅读全文

浙公网安备 33010602011771号