版本比较
ztyroy 的训练日志
正文
增加 446 行删除 3 行
226 行未改动全部展开227228229230231231232233234235236236237238239240473 行未改动全部展开71471571671771871871972072172242 行未改动76576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211226 行未改动全部展开开始做 [CF670C](https://codeforces.com/problemset/problem/670/C)#### 12:00[CF670C](https://codeforces.com/problemset/problem/670/C) 过了#### 14:59开始做 开始做[P10452](https://www.luogu.com.cn/problem/P10452)#### 15:01[P10452](https://www.luogu.com.cn/problem/P10452) 过了#### 15:06开始做 开始做[P2280](https://www.luogu.com.cn/problem/P2280)### 2026.03.08#### 19:00~20:15[晚练](https://loj.ac/p/2763),想以非常优雅的方式通过,结果没写出来(bushi473 行未改动全部展开[晚练](https://www.luogu.com.cn/problem/P15819)#### 19:278 pts#### 19:35神秘思路:建一颗三叉树,然后就不知道了 神秘思路:建一颗三叉树,然后就不知道了#### 19:42二分#### 20:05与点的编号无关42 行未改动#### 10:58继续做 [P3396](https://www.luogu.com.cn/problem/P3396)#### 11:10换一道,做 [HDU8088](https://vjudge.net/problem/HDU-8088)#### 14:30继续做 [HDU8088](https://vjudge.net/problem/HDU-8088)#### 15:10C 老让我下节课去给初二的讲题,这节课先准备一下#### 16:15去讲课了#### 17:00终于讲完了#### 17:05继续做 [HDU8088](https://vjudge.net/problem/HDU-8088)#### 18:40~19:20英语晚课#### 19:30[晚练](https://www.luogu.com.cn/problem/P9352)#### 19:3541pts 部分分我做过#### 19:56不管了,先打部分分#### 20:1741pts#### 20:3951pts#### 20:41交了,荣获 51pts 的好成绩### 2026.03.27#### 10:06写一下训练日志#### 10:15改[晚练](https://www.luogu.com.cn/problem/P9352)#### 11:27[晚练](https://www.luogu.com.cn/problem/P9352)过了#### 11:30继续做 [HDU8088](https://vjudge.net/problem/HDU-8088)#### 11:40~12:10体锻#### 14:30继续做 [HDU8088](https://vjudge.net/problem/HDU-8088)#### 15:12上网发现一个叫做 $O(1)$ 求 $\gcd$,问了下 $AI$,现在已经会了,开始实践
[文章](https://www.luogu.com.cn/paste/ul7th52n)#### ?好难调啊...#### 18:20继续做 [HDU8088](https://vjudge.net/problem/HDU-8088)#### 18:55bushi,我本地无论是随机数据还是极端数据跑得都比 [WBJ 大佬](https://www.luogu.com.cn/user/1420917)快,但是他过了,我 T 了### 2026.03.28#### 09:10发现一个优化:需要求 $\gcd$ 的两个数中至少有一个数 $\le \sqrt n$,所以 $gcdTable$ 只需要处理 $\sqrt n \times \sqrt n$ 的大小即可,并且不需要处理 $split$ 数组,因为有一个数一定 $\le \sqrt n$,这样常数锐减,赶紧试试#### 09:27本地极端数据 33.01s -> 22.22s,随机数据 7.6s -> 6.9s#### 09:36尝试把 vector 换成数组#### 09:47我草,过了!本地极端数据 22.22s -> 4.6s,随机数据 6.9s -> 2.4s#### 09:49终于把 [HDU8088](https://vjudge.net/problem/HDU-8088) 过了!!!#### 09:59~10:09写一下训练日志#### 10:15~10:55C 老演讲#### 11:10开始做 [HDU6984](https://vjudge.net/problem/HDU-6984)#### 11:36刚才糖了,以为会了,结果发现思路错了#### 11:38继续做 [P8250](https://www.luogu.com.cn/problem/P8250)#### 13:00[模拟赛](https://junior.local.cwoi.com.cn:8443/contest/C0480)#### 13:05开始看 [A](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/A)#### 13:09好像会 100pts 了#### 13:18不对,这出题人脸都不要了,在 $a_i$ 全部相等的时候能卡到 $O(n^2)$,还要用手写栈+倍增才行#### 15:07写了 60pts,100pts 调不出来#### 15:08开始看 [B](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/B)#### 15:10好像会 40pts 了#### 15:2030pts了#### 15:2240pts了#### 15:23开始看 [C](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/C)#### 15:26好像会 30pts 了#### 15:3130pts 了#### 15:32开始看 [D](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/D)#### 15:50没看懂 [D](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/D) 的题意#### 15:52回来继续看 [A](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/A)#### 16:42过了!!!100pts#### 16:44继续来看 [B](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/B)#### 17:00极限写出 70pts!!!#### 17:00交卷,100+70+30+0,没有挂分,rk7#### 20:20wc,忘打 [ABC](https://atcoder.jp/contests/abc451) 了#### 22:45开始打 [CF](https://codeforces.com/contest/2211)#### 22:49[A](https://codeforces.com/contest/2211/problem/A) 过了#### 23:14[B](https://codeforces.com/contest/2211/problem/B) 过了#### 23:26[C1](https://codeforces.com/contest/2211/problem/C1) 过了### 2026.03.29#### 1:15结束了,最后接近 2 个小时 [C2](https://codeforces.com/contest/2211/problem/C2) 和 [D](https://codeforces.com/contest/2211/problem/D) 都没磕出来,要掉分了...#### 19:00[晚练](https://www.luogu.com.cn/problem/P9322)#### 19:05对于除了马以外的任意棋子,都可以被皇后覆盖#### 19:08子任务一会了#### 19:1512#### 19:20子任务四会了#### 19:2312+8#### 19:25子任务二会了#### 19:2812+8+9#### 19:31子任务五会了#### 19:4012+8+9+6#### 19:42子任务八会了#### 19:4612+8+9+6+7#### 19:47发现子任务五处理有误#### 19:48子任务九会了#### 19:5012+8+9+7+6#### 19:55子任务三会了#### 19:5812+8+9+7+6+13#### 20:00开始磕马的情况#### 20:30没磕出来#### 20:32子任务9挂了,49pts#### 20:39子任务9改对了### 2026.03.30#### 10:10改[晚练](https://www.luogu.com.cn/problem/P9322)#### 10:37把子任务5改对了#### 10:40开始研究题解#### 11:30oh~ no ~ 看不懂 ~ 思密达 ~#### 11:45诶,我发现一个规律,斜着找规律,好像还蛮有规律的哈,让我仔细推理一下#### 14:30继续改[晚练](https://www.luogu.com.cn/problem/P9322)#### 14:50开始打代码#### 16:08过了!!!#### 16:15~17:05体育课#### 17:07~17:35写一下训练日志#### 17:36继续做 [P8250](https://www.luogu.com.cn/problem/P8250)#### 18:50[晚练](https://www.luogu.com.cn/problem/P4364)#### 19:0730pts#### 19:40知道为何 100pts 挂了,因为有重复的,但至少有 55pts#### 19:50想到正解了#### 20:30没磕出来#### 20:32荣获 60pts### 2026.03.31#### 10:07改[晚练](https://www.luogu.com.cn/problem/P4364)#### 11:10[晚练](https://www.luogu.com.cn/problem/P4364)过了#### 11:15开始改 [%你赛 D](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/D)#### 11:40体锻课,打篮球#### 14:30继续改 [%你赛 D](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/D)#### 14:3650pts 改出来了#### 14:58[%你赛 D](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/D) 过了#### 15:02开始改 [%你赛 B](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/B)#### 15:20~16:10[hyc 大佬](https://www.luogu.com.cn/user/725640)和 [gcx 大佬](https://www.luogu.com.cn/user/717476)讲[晚练](https://www.luogu.com.cn/problem/P4364)#### 16:20继续改 [%你赛 B](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/B)#### 17:20[%你赛 B](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/B) 过了#### 17:25找原题并交了,诶,[A](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/A) 的 [原](https://codeforces.com/problemset/problem/5/E) 竟然是道 2400!!!我场切了???#### 17:40开始改 [%你赛 C](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/C)#### 18:20继续改 [%你赛 C](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/C)#### 19:10~20:40语文晚课## 2026.04### 2026.04.01#### 07:50~08:21写一下训练日志#### 08:22继续改 [%你赛 C](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/C)#### 09:03[%你赛 C](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/C) 终于看懂题解了,开始打代码#### 10:13[%你赛 C](https://junior.local.cwoi.com.cn:8443/contest/C0480/problem/C) 过了!!!#### 10:21继续做 [P8250](https://www.luogu.com.cn/problem/P8250)#### 11:22[P8250](https://www.luogu.com.cn/problem/P8250) 过了#### 11:29开始看 [CF2173F](https://codeforces.com/problemset/problem/2173/F)#### 14:30继续做 [CF2173F](https://codeforces.com/problemset/problem/2173/F)#### 14:46[CF2173F](https://codeforces.com/problemset/problem/2173/F) 想到 $O(n \sqrt n \log n)$ 做法,能过#### 15:14[CF2173F](https://codeforces.com/problemset/problem/2173/F) 过了#### 15:20更新[这个](https://www.luogu.com.cn/article/n2s5wjkj)#### 15:42开始做 [P6189](https://www.luogu.com.cn/problem/P6189)#### 16:04想到 80pts 做法#### 16:05?写出来了?80pts 这么好拿?#### 17:20[P6189](https://www.luogu.com.cn/problem/P6189) 过了#### 18:30[晚练](https://www.luogu.com.cn/problem/P15567)#### 18:5983pts#### 19:40交了#### 20:00我草我是傻逼,我定义 $s$ 数组干嘛,直接算就行了啊,不是,我 TM 真服了,差点场切#### 20:05[晚练](https://www.luogu.com.cn/problem/P15567)过了#### 20:10继续做 [P3396](https://www.luogu.com.cn/problem/P3396)### 2026.04.02#### 07:50正式的开始刷蓝书!#### 08:00开始做 [P10449](https://www.luogu.com.cn/problem/P10449)#### 08:20[P10449](https://www.luogu.com.cn/problem/P10449) 过了#### 08:23开始做 [P4552](https://www.luogu.com.cn/problem/P4552)#### 08:41[P4552](https://www.luogu.com.cn/problem/P4552) 过了,感谢[帖子](https://www.luogu.com.cn/discuss/1182743),刚才脑子抽了,不知道第一发写的啥#### 08:42开始做 [P2280](https://www.luogu.com.cn/problem/P2280)#### 08:56**可能存在多个目标在同一位置上的情况!** **可能存在多个目标在同一位置上的情况!** **可能存在多个目标在同一位置上的情况!**#### 08:57[P2280](https://www.luogu.com.cn/problem/P2280) 过了#### 08:59开始做 [P2879](https://www.luogu.com.cn/problem/P2879)#### 09:26[P2879](https://www.luogu.com.cn/problem/P2879) 过了#### 09:28开始做 [P10450](https://www.luogu.com.cn/problem/P10450)#### 09:45~10:30注册了 AcWing 账号,把做了的题交了#### 10:40继续做 [P10450](https://www.luogu.com.cn/problem/P10450)#### 11:14[P10450](https://www.luogu.com.cn/problem/P10450) 过了,一开始写双指针去了,结果发现伪了#### 11:16开始做 [P1168](https://www.luogu.com.cn/problem/P1168)#### 11:29[P1168](https://www.luogu.com.cn/problem/P1168) 过了#### 11:32开始做 [UVA10810](https://www.luogu.com.cn/problem/UVA10810)#### 11:47[UVA10810](https://www.luogu.com.cn/problem/UVA10810) 过了#### 11:49开始做 [P10455](https://www.luogu.com.cn/problem/P10455)#### 14:32开始改 [P2887](https://www.luogu.com.cn/problem/P2887)#### 14:38[P2887](https://www.luogu.com.cn/problem/P2887) 过了#### 14:41开始做 [P2859](https://www.luogu.com.cn/problem/P2859)#### 14:57[P2859](https://www.luogu.com.cn/problem/P2859) 过了#### 14:58开始做 [UVA1193](https://www.luogu.com.cn/problem/UVA1193)#### 15:07[UVA1193](https://www.luogu.com.cn/problem/UVA1193) 过了#### 15:09开始做 [P10453](https://www.luogu.com.cn/problem/P10453)#### 16:09[P10453](https://www.luogu.com.cn/problem/P10453) 过了#### 16:11继续做 [P10451](https://www.luogu.com.cn/problem/P10451)#### 16:24[P10451](https://www.luogu.com.cn/problem/P10451) 的题面写的是啥啊,看了讨论区才看懂题意#### 16:39[P10451](https://www.luogu.com.cn/problem/P10451) 过了#### 16:42开始做 [P10456](https://www.luogu.com.cn/problem/P10456)#### 17:10[P10456](https://www.luogu.com.cn/problem/P10456) 过了#### 17:12开始做 [P10457](https://www.luogu.com.cn/problem/P10457)#### 18:30开始[晚练](https://www.luogu.com.cn/problem/P13308)和[晚练](https://www.luogu.com.cn/problem/P12247)#### 19:50交卷!#### 19:52两道都过了!#### 20:10继续做 [P10457](https://www.luogu.com.cn/problem/P10457)### 2026.04.03#### 7:45开始打 [%你赛](https://junior.local.cwoi.com.cn:8443/contest/C0484)#### 7:47开始看 [A](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/A)#### 7:58[A](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/A) 会了#### 8:46[A](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/A) 100pts 写出来了,但有点卡常?#### 8:53开始看 [B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B)#### 8:57[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 会 60pts 了#### 9:33[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 没调出来,等会儿回来看#### 9:37开始看 [C](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/C)#### 9:39电脑重启#### 9:44继续看 [C](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/C)#### 9:45[C](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/C) 没思路,跳了#### 9:45开始看 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D)#### 9:49[D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D) 会 50pts 了#### 9:59[D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D) 30pts#### 10:25发现 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D) 剩下20pts做法伪了,跳了#### 10:26回去调 [B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B)#### 10:44[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 调出来了 60pts#### 10:45开始优化 [A](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/A) 常数#### 10:51[A](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/A) 优化成功了 2.0s->1.2s#### 11:05[A](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/A) 优化成功了 1.2s->0.9s#### 11:12继续做 [B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B)#### 11:20我草,[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 过了,100pts,但卡常,好像 ST 表+欧拉序 $O(1)$ 求 LCA 就不卡常了,但 25 分钟我应该打不完,无论如何都至少有 80pts#### 11:30交卷!#### 11:35100+50+0+30=180,[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 调试代码的 `return 0;` 忘删了,还没输出就返回了,只拿了部分分,而且把菊花图看成链了,代码里把判链写成 `u==i||v==i+1` 了,把菊花图判成链了,应该是 `u==i&&v==i+1`,挂了 30pts#### 11:43[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 改到 80pts 了#### 12:12[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 加了个 ST 表+欧拉序 $O(1)$ 求 LCA,卡过去了#### 14:32不对,我 [B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 的 AC 代码有问题,数据太水了,我改改#### 15:09[B](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/B) 现在真过了,我上一个极品代码到底是怎么过的(雾),挂了以下几个点:- 欧拉序和 ST 表应该要开 $2e6$,我都只开了 $2e5$- `ptm()`(预处理欧拉序和 ST 表)在读入 $n$ 和建树之前- `dfs()`(预处理欧拉序)没有运行- ST 表只处理了 17,要处理 21
不是,这么多问题相加给我过了?#### 15:15看 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D) 的题解,试着改一下#### 16:00~16:40[金钩大佬](https://www.luogu.com.cn/user/910593) 讲 [%你赛](https://junior.local.cwoi.com.cn:8443/contest/C0484)#### 16:45继续改 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D)### 2026.04.06#### 20:03继续改 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D)#### 20:20不是,我 D 盘怎么掉了#### 20:35重启多次后无果#### 20:40继续改 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D)### 2026.04.07#### 08:00写一下训练日志#### 08:25继续改 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D)#### 08:50~09:48C 老演讲#### 10:05继续改 [D](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/D)#### 10:20开始改 [C](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/C)#### 16:00[C](https://junior.local.cwoi.com.cn:8443/contest/C0484/problem/C) 好难#### 16:10~17:30帮 [__WBJ0429 __](https://www.luogu.com.cn/user/1420917) 卡常,我真服了,好难卡#### 17:32继续做 [P10457](https://www.luogu.com.cn/problem/P10457)#### 17:41[P10457](https://www.luogu.com.cn/problem/P10457) 过了