03 2021 档案
摘要:[题面传送门](https://www.luogu.com.cn/problem/P6775) ~~好久没写过题解了,感觉几天没写手都生疏了~~ 首先这种题目直接做肯定是有些困难的,不过注意到题目中有个奇奇怪怪的条件叫 ,我们不妨从此入手解决这道题。 我们先来探究
阅读全文
摘要:[Atcoder 题面传送门](https://atcoder.jp/contests/arc096/tasks/arc096_c) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT4119) 简单题,由于这场 arc 的 F 是 jxd 作业而我不会做
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/538/problem/G) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF538G) 一道很神的乱搞题 %%% 首先注意到如果直接去做,横纵坐标有关联
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1383/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1383E) Yet another 自己搞出来的难度 $\ge 2800
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/193/problem/D) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF193D) ~~感觉这个 *2900 并不难啊,为什么我没想出来呢 awa~
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P7324) 现场人傻系列…… 首先建出 的表达式树,具体来说表达式的每一个叶子节点表示一个数组 ,每一个非叶子节点都表示一次运算,它的值表示左右儿子进行该运算后得到的结果。这个可以通过建表达式树的套
阅读全文
摘要:dp+单调栈的思想,思维题
阅读全文
摘要:矩阵乘法+优化状态,神仙题 %%%%%%%%%%%%%%%%%%%%%%%(真就一晚上只肝一道毒瘤题呗)
阅读全文
摘要:线段树标记 pushup 的技巧,类似于 CF1149C
阅读全文
摘要:AC 自动机与矩乘结合的套路题
阅读全文
摘要:难度中上的矩阵乘法
阅读全文
摘要:二分,思维题
阅读全文
摘要:难度 Cu 的 AGC F,Atcoder 风格的计数 DP
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P3246) ~~这道题为什么我就没想出来呢/kk~~ 对于每组询问 ,我们首先求出区间 中最小值的位置 ,这个可以用 ST 表实现 $\mathcal O(n\log n)-\ma
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/772/problem/D) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF772D) 首先很容易注意到一件事,那就是对于所有 可能成为
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/985/problem/G) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF985G) ~~真·ycx 做啥题我就做啥题~~ 考虑枚举 ,我们预处
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/446/problem/D) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF446D) 神仙题,%%% 首先考虑所有格子都是陷阱格的情况,那显然就是一个
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P4755) ~~wssb,我紫菜~~ 看到这类与最大值统计有关的问题可以很自然地想到分治,考虑对 进行分治,求出对于所有 的点对 的贡献之和。若
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/639/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF639E) ~~原来 jxd 作业里也有我会做的题 i 了 i 了~~ 首先
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/566/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF566C) 神仙题 %%% 首先考虑对这个奇奇怪怪的 进
阅读全文
摘要:~~一个炒鸡水的东西哦(((~~ 大概就是我们要求一个分式 的最大值(最小值),我们可以二分这个值,并检验是否可能存在 $\dfrac{\sum\limits_{x\in S}f
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1413/problem/F) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1413F) 其实是一道还算一般的题罢……大概是最近刷长链剖分,被[某道长
阅读全文
摘要:开坑待填 UPD on 2021.3.25:终于学到这个了,之前二月份的时候就说要学来着的?下次争取不做鸽子/xk/xk 长链剖分,顾名思义,就是将树链剖分中重儿子的定义由“大小最大的节点”改为“**子树内深度最深的节点深度最大的节点**”,或者给它一个新定义叫做“深儿子”。和树链剖分一样,我们还是
阅读全文
摘要:长链剖分+线段树
阅读全文
摘要:长链剖分+直径+找性质,神仙题
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1270/problem/H) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1270H) 首先需发现一个性质,那就是每一个连通块所对应的是一个区间。换
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1491/problem/G) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1491G) ~~obviously,难度高一点的构造题对我来说都是不可做
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/708/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF708E) ~~神仙 *3100,%%%~~ 首先容易注意到 $\foral
阅读全文
摘要:[Atcoder 题面传送门](https://atcoder.jp/contests/agc020/tasks/agc020_e) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT3859) 首先先考虑如果没有什么子集的限制怎样计算方案数。明显就是一个
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/704/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF704C) ~~u1s1 感觉这种题被评到 *2900 是因为细节太繁琐了,
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1158/problem/F) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1158F) ~~人生中第一道 *3500(显然不是自己独立 AC 的),
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/788/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF788E) ~~这是一道 *2900 的 D1E,而且被!我!自!己!搞!出
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P3750) 首先我们需注意到这样一个性质:那就是对于任何一种状态,将其变为全 所用的最小步数的方案是**唯一**的——考虑编号为 的灯,显然如果它原本是暗着的就不用管它了,如果它是亮着的那就只能通过拉
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/809/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF809C) 首先拿到这类题第一步肯定要分析题目给出的矩阵有什么性质。稍微打个
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/889/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF889E) ~~题目名称 hopping~~ 我们记 $x_i=X\bmod
阅读全文
摘要:[Atcoder 题面传送门](https://atcoder.jp/contests/agc020/tasks/agc020_f) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT3860) ~~一道难度 unavailable 的 AGC F 哦~~
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1270/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1270E) 显然,直接暴力枚举是不可能的。 考虑将点按横纵坐标奇偶性分组
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P3688) 首先学过树状数组的应该都知道,将树状数组方向写反等价于前缀和 后缀和,因此题目中伪代码的区间求和实质上是 ,我们
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1361/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1361C) ~~u1s1 感觉这个题作为 D1C 还是蛮合适的……~~
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/547/problem/D) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF547D) 首先考虑将题目中的条件转化为图论的语言。看到“行”“列”,我们很
阅读全文
摘要:~~都初三了还不会这个就有点丢人了吧~~ ~~一个相当 water 的东西哦/doge~~ ### 一些定义 对于图 ,给出以下定义: **欧拉回路**:图 中经过每条边恰好一次的**回路**。 **欧拉路径**:图 中经过每条边恰好一次的**路径**。 ### 欧
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P3600) ~~我竟然独立搞出了这道黑题!incredible!~~ u1s1 这题是我做题时间跨度最大的题之一…… 首先讲下我四个月前想出来的 的做法吧。 记 $f(a)=\max\limi
阅读全文
摘要:[Atcoder 题面传送门](https://atcoder.jp/contests/agc001/tasks/agc001_e) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT1983) Yet another 思维题…… 注意到此题 数据
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1097/problem/G) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1097G) 首先看到这题我的第一反应是:这题跟[这题](https://
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1476/problem/G) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1476G) ~~震惊!我竟然独立切掉了这道 *3100 的题!~~ ~~
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/627/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF627E) 下设 同阶。 首先有一个傻子都会的暴力做法,枚举矩形
阅读全文
摘要:[题面传送门](https://codeforces.com/gym/101175/attachments/download/4878/2011-acmicpc-world-finals-en.pdf) 首先很明显我们会按照 的顺序从小到大买这些机器,故不管三七二十一先将所有机器按 $d
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/840/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF840C) 这是一道 *2500 的 D1C,可个人认为难度堪比某些 *27
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/436/problem/D) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF436D) u1s1 这题数据范围有点迷惑啊……乍一看 $\mathcal
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/285/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF285E) upd on 2021.10.20:修了个 typo( ~~这是
阅读全文
摘要:[Atcoder 题面传送门](https://atcoder.jp/contests/agc013/tasks/arc013_e) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT2371) ~~这是一道难度 Cu 的 AGC E,碰到这种思维题我只能
阅读全文
摘要:UPD 2021.4.9:修了个 typo,为啥写题解老出现 typo 啊( [Codeforces 题目传送门](https://codeforces.com/contest/917/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/C
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P4094) 一道码农题………… u1s1 感觉这类题目都挺套路的,就挑个有代表性的题写一篇题解罢。 首先注意到答案满足可二分性,故考虑二分答案 ,转化为判定性问题。 考虑怎样检验 是否可行,它等
阅读全文
摘要:[Atcoder 题面传送门](https://atcoder.jp/contests/agc033/tasks/agc033_d) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT4927) 首先 的暴力非常容易想,设 $dp_{a,b,c
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/258/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF258E) ~~yyq:“hot tea 不常有,做过了就不能再错过了”~~
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/633/problem/F) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF633F) ~~看来我这个蒟蒻现在也只配刷刷 *2600 左右的题了/dk~
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/796/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF796E) ~~当被数据结构搞自闭的 tzc 信心满满地点开一道 *2400
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1149/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1149C) 首先考虑这个所谓的“括号树”与直径的本质是什么。考虑括号树上
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/643/problem/G) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF643G) 首先考虑 的时候怎么处理,也就是求一个区间的**绝
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P4437) 开始 WA ycx 的~~遗产~~(bushi 首先可以将题目转化为图论模型: 连边 ,然后求图的一个拓扑序 使得 $\s
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/1491/problem/H) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF1491H) *3400 的毒瘤 H 题,特意写个题解纪念一下( 首先对于
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/750/problem/E) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF750E) ~~u1s1 我做这道 *2600 的动力是 wjz 出了道这个
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P5280) 神仙 ZJOI,不会做啊不会做/kk Sooke:“这八成是考场上最可做的题”,由此可见 ZJOI 之毒瘤。 首先有一个非常显然的转化,就是题目中的“将线段树分裂成两棵线段树”,我们事实上大可不必真的把线
阅读全文
摘要:[Atcoder 题面传送门](https://atcoder.jp/contests/arc072/tasks/arc072_c) & [洛谷题面传送门](https://www.luogu.com.cn/problem/AT2401) 首先求出 表示经过 次操作后机器人会位于
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/446/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF446C) ~~你可能会疑惑我为什么要写 *2400 的题的题解~~ 首先一
阅读全文
摘要:[题面传送门](https://www.luogu.com.cn/problem/P2336) 一道还算有点含金量的 SA 罢…… 首先按照套路我们把读入的所有字符串都粘在一起,中间用分隔符隔开并建出后缀数组出来。 我们考虑对于一个固定的字符串 ,什么样的字符串 满足 为 $t
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/671/problem/C) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF671C) ~~*2800 的 DS,不过还是被我自己想出来了~~ ~~u1
阅读全文
摘要:[Codeforces 题目传送门](https://codeforces.com/contest/650/problem/D) & [洛谷题目传送门](https://www.luogu.com.cn/problem/CF650D) 我怕不是个 nt……一开始忽略了”询问独立“这个条件……然后就一
阅读全文