08 2023 档案

该文被密码保护。
posted @ 2023-08-26 08:31 ljfyyds 编辑
摘要:# H. 3.魔法传输 这道题是区间加上等差数列的修改,我们直接去修改会很难想 然后我们可以发现他这个只有单点查询,所以我们就可以这么想,类似于一个差分操作 我们在每一次操作的时候我们就直接将这个区间都加上一,然后再将右端点的后一位减去区间长度 对于每一次单点查询我们就直接对这个点进行前缀和操作即可 阅读全文 »
posted @ 2023-08-23 19:01 ljfyyds 阅读(34) 评论(0) 推荐(0) 编辑
摘要:# 二维前缀和和差分 ## 1.二维前缀和 ![](https://cdn.luogu.com.cn/upload/image_hosting/9ardo6x9.png) si,j=si1,j+si,j1si1,j1 $$ s_{x_2,y_2}-s_{ 阅读全文 »
posted @ 2023-08-21 11:22 ljfyyds 阅读(62) 评论(0) 推荐(0) 编辑
摘要:## [C. 【例题3】公园遛狗](https://www.ybtoj.com.cn/contest/541/problem/3) 我们对于每一个线段树的节点,维护几个值 sum 表示当前区间的区间和 ml 表示最大前缀和 mr 表示最大后缀和 ans 表示当前区间的最大子段和 接下 阅读全文 »
posted @ 2023-08-18 15:49 ljfyyds 阅读(29) 评论(0) 推荐(0) 编辑
摘要:# dfs序线段树 [1.树上操作](https://www.ybtoj.com.cn/contest/541/problem/6) ### 思路 遍历一整棵树,记录一下节点 u 的所对应的子树的节点数 sizu 以及 dfsdfnu 根据整棵树的 dfs 序,我们可以 阅读全文 »
posted @ 2023-08-18 10:58 ljfyyds 阅读(34) 评论(0) 推荐(0) 编辑
摘要:树上前缀和 阅读全文 »
posted @ 2023-08-12 21:10 ljfyyds 阅读(13) 评论(0) 推荐(0) 编辑
摘要:# [Codeforces Round 881 (Div. 3)](https://codeforces.com/contest/1857) ## [A.Array Coloring](https://www.luogu.com.cn/problem/CF1857A) ### 题目大意 [link] 阅读全文 »
posted @ 2023-08-08 20:24 ljfyyds 阅读(29) 评论(0) 推荐(0) 编辑
摘要:## [A.Tales of a Sort](https://codeforces.com/contest/1856/problem/A) ### 题目大意 Alphen has an array of positive integers a of length n. Alphen can pe 阅读全文 »
posted @ 2023-08-07 16:50 ljfyyds 阅读(34) 评论(0) 推荐(1) 编辑
摘要:# [Codeforces Round 882 (Div. 2)](https://codeforces.com/contest/1847) ## [A.The Man who became a God](https://www.luogu.com.cn/problem/CF1847A) ### 题 阅读全文 »
posted @ 2023-08-04 15:01 ljfyyds 阅读(35) 评论(0) 推荐(0) 编辑
摘要:## T3 strong password 1. 就是对于输入的每一个 l,r ,我们遍历 s[l] s[r],对于每次遍历,我们设置一个临时指针 cur ,然后通过指针右移寻找所需要的值 2. 在外面我们弄两个指针,分别代表每次遍历 [l,r] 的区间的指针 nmx 和全局指针 阅读全文 »
posted @ 2023-08-03 20:02 ljfyyds 阅读(12) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 887 (Div. 2) 阅读全文 »
posted @ 2023-08-01 21:03 ljfyyds 阅读(34) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 885 (Div. 2) 阅读全文 »
posted @ 2023-08-01 20:55 ljfyyds 阅读(17) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示