摘要:
Description: 给你n个矩形,求它们周长的并 Hint: $n \le 5000$ Solution: 分两种情况算,横的和竖的 横的就用2\ 覆盖区间段数\ 长度 竖的相邻扫描线相减就行 cpp include include include include include includ 阅读全文
摘要:
Description: 给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Hint: $n\le 1000$ Solution: 扫描线push_up时多讨论几种情况而已 cpp include include include include include include incl 阅读全文
摘要:
Description: 给你n个矩形,求矩形面积并 Hint: $n\le 100$ Solution: 扫描线模板 cpp include include include include include include include include include include define 阅读全文
摘要:
Description: 一次考试共有n个人参加,第i个人说:“有ai个人分数比我高,bi个人分数比我低。”问最少有几个人没有说真话(可能有相同的分数) Hint: $n \le 10^5$ Solution: 题目给的信息相当与$[a+1,n b]$的分数相等 于是问题转化为从一些带权区间中选出一 阅读全文
摘要:
Description: 知名美食家小 A被邀请至ATM 大酒店,为其品评菜肴。 ATM 酒店为小 A 准备了 N 道菜肴,酒店按照为菜肴预估的质量从高到低给予1到N的顺序编号,预估质量最高的菜肴编号为1。 由于菜肴之间口味搭配的问题,某些菜肴必须在另一些菜肴之前制作,具体的,一共有 M 条形如”i 阅读全文
该文被密码保护。 阅读全文