上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 82 下一页
摘要: #### T1 ~~刚开始写了个扫描线+线段树,后来发现自己是个弱智……~~ 我们枚举删了哪个矩形,计算去掉这个矩形后所有矩形的交的面积并求和,这个可以通过维护前后缀矩形交实现。 但是这样被 $n$ 块地毯覆盖的部分会被多计算 $n-1$ 次,因此需减掉被 $n$ 块地毯覆盖的部分的面积乘以 $n- 阅读全文
posted @ 2021-10-21 22:29 tzc_wk 阅读(63) 评论(0) 推荐(0)
摘要: [题面传送门](http://www.nfls.com.cn:20034/problem/10283) 提供一种不同于官方题解的做法,考试最后 20min 想出来却没时间写了。 下记 $t$ 表示题面中的 $m$,$m=|t|$ 首先注意到 $k\le 10^{18}$,​因此我们猜个结论,就是对于 阅读全文
posted @ 2021-10-21 14:31 tzc_wk 阅读(120) 评论(0) 推荐(0)
摘要: /qiao 阅读全文
posted @ 2021-10-21 10:23 tzc_wk 阅读(126) 评论(0) 推荐(0)
摘要: [洛谷题面传送门](https://www.luogu.com.cn/problem/AT3593) & [Atcoder 题面传送门](https://atcoder.jp/contests/code-festival-2017-qualc/tasks/code_festival_2017_qua 阅读全文
posted @ 2021-10-20 23:41 tzc_wk 阅读(108) 评论(0) 推荐(0)
摘要: 一道挺经典的单调队列优化 dp 阅读全文
posted @ 2021-10-20 20:36 tzc_wk 阅读(91) 评论(0) 推荐(0)
摘要: [题面传送门](https://www.luogu.com.cn/problem/P7078) 题意: > - 有 $n$ 条蛇,每条蛇有个实力 $a_i$ > - 我们称编号为 $x$ 的蛇比编号为 $y$ 的蛇强,当且仅当 $a_x>a_y$ 或 $a_x=a_y$ 且 $x>y$。 > - 每 阅读全文
posted @ 2021-10-20 13:35 tzc_wk 阅读(251) 评论(0) 推荐(0)
摘要: [Codeforces 题面传送门](https://codeforces.ml/contest/356/problem/E) & [洛谷题面传送门](https://www.luogu.com.cn/problem/CF356E) 首先显然一个 gray 串的长度只可能是 $2^k-1$,其中 $ 阅读全文
posted @ 2021-10-20 12:39 tzc_wk 阅读(89) 评论(0) 推荐(0)
摘要: 在 nlogn 做法基础上继续找性质+指针维护 阅读全文
posted @ 2021-10-20 09:44 tzc_wk 阅读(101) 评论(0) 推荐(1)
摘要: EIyyds 阅读全文
posted @ 2021-10-19 22:34 tzc_wk 阅读(48) 评论(0) 推荐(0)
摘要: 比较有意思的哈希 阅读全文
posted @ 2021-10-19 20:49 tzc_wk 阅读(96) 评论(0) 推荐(0)
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 82 下一页