跳到正文

isuki

441693

OI 人何必难为OI 人

在洛谷打开
资料、奖项与版本

资料

编号
441693
抓取

奖项

2024 CSP-S
一等奖
2024 NOIP
一等奖
2024 APIO
铜牌
2024 NOI 冬令营
铜牌
2023 CSP-S
一等奖
2023 NOIP
一等奖
2022 CSP-J
一等奖
2022 CSP-S
一等奖
2021 CSP-J
一等奖
2021 CSP-S
二等奖

版本

  1. v2当前
  2. v1

AFOED on 2025.3.2

3114489507

On the banks of the Rhine, a beautiful castle had been standing for centuries. In the cellar of the castle, an intricate network of webbing had been constructed by industrious spiders who lived there. One day a strong wind sprang up and destroyed the web. Franticaily the spiders worked to repair the damage. They thought it was their webbing that was holding up the castle.

zchakioi

https://www.luogu.com.cn/record/155298356

https://www.luogu.com.cn/blog/hhoppitree/post-2023-hao-ti-ji-lu-part

https://www.cnblogs.com/CDOI-24374/p/16485318.html

OI 人何必难为OI 人

whk越考越差怎么办

要学的

综合资料1

浅谈矩阵乘法维护线段树标记的技巧

bloom filter

q-analog

IOI中国国家候选队论文

更高级的莫反

符号化的方法

格点路径计数

要做的

CF3000+ DS 题单

CF 难题题单

Atcoder 难题题单

咕咕

Atcoder 题单1

Atcoder 题单2

zxy的思维技巧

数学题

题单1

题单2

题单3

题单4

https://blog.csdn.net/qq_36797743/article/details/109515712

https://www.luogu.com.cn/problem/P2797

[GDOI2014] Beyond

一些奇怪的东西

圣经

你这一辈子就是被 LCT 害了

???

事迹表

2022/11/19: AC 紫题 100

2023/2/26:AC 紫题 200

2023/6/24:AC 紫题 300

2023/8/2:AC 紫题 400

2023/11/2:AC 紫题 500

备忘录

Fira Code

bzoj 数据下载

popcount⁡(x⨁y)≡popcount⁡(x)+popcount⁡(y)(mod2)\operatorname{popcount}(x\bigoplus y)\equiv\operatorname{popcount}(x)+\operatorname{popcount}(y)\pmod2

多项式全鸡桶(不完全)

任意模数多项式全家桶

https://www.cnblogs.com/limit-ak-ioi/p/15696691.html

4567891

https://www.luogu.com.cn/record/86015320

https://www.cnblogs.com/coldchair/category/1493317.html

https://new.bzoj.org:88/

共 1 篇
  1. 题解

    题解 [ABC218H] Red and Blue Lamps

    该问题通过两个关键性质简化: 对称性:将R盏蓝灯变红或N-R盏红灯变蓝的最优解等价,因此取R=min(R, N-R)。 不连续性:最优变色方案中,变色的灯必须不连续。 最终转化为:在N盏灯中选择R盏不连续的灯,每盏灯的收益为相邻两灯的值之和(即A[i-1] + A[i]),求最大总收益。 解决方法:采用反悔贪心策略,使用优先队列(最大堆)维护当前可选的收益。每次取出最大收益的灯进行变色,同时将该灯的左右相邻灯合并,并动态更新合并后的收益值。通过不断调整堆中的元素,最终在R次操作后得到最大总收益。 代码核心逻辑: 初始时将每个灯的收益设为相邻两灯的和。 通过堆不断选择最大收益的灯,合并其左右相邻灯并更新收益,直到选满R次。 合并操作通过维护前后指针(pre, nxt)实现,确保不连续性约束。

    8 赞