上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: https://codeforces.com/contest/1837 https://codeforces.com/contest/1837/problems 利益相关:上紫祭。 真的不要以为这道题放在 F 就不敢做。 ABC 题都过水,就不写了。 代码丢在这里: A:https://codefo 阅读全文
posted @ 2023-05-26 18:58 CountingGroup 阅读(105) 评论(3) 推荐(1) 编辑
摘要: 一、用倍增替代二分 从高位到低位 枚举 $2^{k}, 2^{k - 1}, \dots, 1$,$k$ 自己定,如果能对答案产生贡献并且依然 check() = true,就加上贡献。 其实很类似于倍增 LCA,只不过某时候用这种方法感觉常数会小一些。 二、实际应用 给定一个数列 $a_{1}, 阅读全文
posted @ 2023-05-15 15:05 CountingGroup 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 一、扫描线 扫描线一般用于图形类的计算,用数据结构辅助在图形上扫来扫去,比如计算矩形面积并,周长并,二位数点等问题。 二、Atlantis 问题 / 矩形面积并 https://www.luogu.com.cn/problem/P5490 先挂张图(明显是 OI-wiki 的): 算法原理很简单,就 阅读全文
posted @ 2023-05-13 15:50 CountingGroup 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 一、抽屉原理 Theorem 1. $n + 1$ 个元素分配到 $n$ 个盒子里,一定会有一个盒子有 $\geq 2$ 个元素。 Theorem 2. $m$ 个元素分配到 $n$ 个盒子里,一定会有一个盒子有 $\displaystyle \geq \left\lfloor\frac{m - 1 阅读全文
posted @ 2023-05-12 19:32 CountingGroup 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 一、数位 DP 你说的对,但是数位 DP 是用于解决一种数位统计类似的问题,往往数据范围很大,比如 $10^9, 10^{12}, 10^{18}$ 甚至更大,这种 DP 一般需要记录 当前考虑到第几位,是否贴上界 / 下界,以及一些题目里的东西,需要具体题目具体分析。 二、HDU 3652 - B 阅读全文
posted @ 2023-05-12 14:37 CountingGroup 阅读(13) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P4544 感觉是很没意思的 DP + DS 优化,以前做过几道更难的题: https://codeforces.com/contest/1788/problem/E https://atcoder.jp/contests/abc28 阅读全文
posted @ 2023-05-12 12:59 CountingGroup 阅读(38) 评论(0) 推荐(0) 编辑
摘要: AtCoder Regular Contest 091 - F - Strange Nim https://atcoder.jp/contests/arc091/tasks/arc091_d 清北学堂讲的一道题,我艹感觉这结论很难猜啊。 做这种题一定是先写爆搜打表啊,先写了一个博弈论求 SG 函数: 阅读全文
posted @ 2023-05-11 19:36 CountingGroup 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 题面:https://atcoder.jp/contests/abc298/tasks_print A - Job Interview 直接模拟即可。 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include 阅读全文
posted @ 2023-05-11 17:54 CountingGroup 阅读(38) 评论(0) 推荐(0) 编辑
摘要: Day 0 晚上没有睡好,差不多只睡了不到 6h,只能怪自己心理素质太差。 Day 1 8:30 左右发密码,密码给错了一次,但是延时,biu#2019miss 和 solo@2022。 8:36 开考看到第一题,一眼前缀和题,但是这个需要枚举一堆东西,心里就咯噔一下,我乱写一通然后就过了第一个样例 阅读全文
posted @ 2023-05-10 21:20 CountingGroup 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 这场寄大了。 rating -= 99。 赛前说自己可以上 Candidate Master,只差 29 分,结果,,,,。 https://codeforces.com/contest/1824 https://codeforces.com/contest/1825 # 2A. LuoTianyi 阅读全文
posted @ 2023-05-08 22:44 CountingGroup 阅读(240) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页