跳到正文

a_123_a

998988

这个人很勤奋,什么都留下了

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

资料

编号
998988
抓取

画图
原题机
欧拉计划
算法笔记
图形计算器

关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。
关于迭代器:例如 st.rbegin() 其 -- 后是 st.end() 而并非 -- --st.end()。

共 8 篇
  1. 题解

    P17833

    该题要求计算满足特定路径条件的岛屿数量。核心思路是通过预处理每个岛屿i向右能到达的最远点nxt_i,将路径数情况划分为三种状态: 状态A:当前层末尾路径数为1(或仅一个位置); 状态B:末尾路径数为1,其余≥2; 状态C:末尾路径数为2,其余≥2。 通过动态规划,定义a[i]、b[i]、c[i]分别表示以i为右端点且下一层状态为A、B、C的岛屿数量。根据nxt_i的值计算q1(路径数为1的位置数)和q2(路径数为2的位置数),并依据q1的值进行状态转移: 若q1≥2或nxt_i=i+1,则a[i] = q2 + a[nxt_i],b[i] = a[nxt_i],c[i] = q1 + c[nxt_i]; 若q1=1,则a[i] = q2 + b[nxt_i],b[i] = b[nxt_i],c[i] = q1 + c[nxt_i]; 若q1=0且q2>0,则a[i] = q2 + c[nxt_i],否则直接舍弃。 最终答案为所有满足nxt[i]>i的a[nxt[i]]之和,时间复杂度为O(n)。代码通过倒序遍历实现状态转移,利用nxt数组快速定位范围。

  2. 题解

    题解:P6128 [JSOI2012] 幼儿园的游戏

    这道题要求计算满足条件的握手方式数量,每个小朋友必须与恰好两人握手。由于n≤8,状态总数为2^8=256,适合使用轮廓线DP处理有老师列的状态转移。对于中间无老师的列,利用矩阵快速幂优化转移过程,因k≤100且m可能极大,通过预处理转移矩阵并分段计算,将时间复杂度降至可接受范围。具体步骤为:预处理每个状态的转移矩阵,遍历所有有老师的位置,用矩阵快速幂处理连续空列的转移,最终通过DP状态转移得到答案。

  3. 题解

    题解:P11334 [NOISG 2020 Finals] Progression

    题意简化:给定一个序列,每次将一段区间加上一个等差数列或覆盖为一个等差数列,每次查询询问 l 到 r 之间最长等差数列有多长。 因为等差数列公差相等,所以我们维护原序列的差分数组,每次查找就只需要找最长的相同连续子序列就可以了。我们可以用类似于最大子段和的方式维护,线段树记录区间…

  4. 题解

    题解:P12360 [eJOI 2024] 足球决斗 / CF Duels

    显然有但我们知道的信息越多时,我们越能知道我们是否能够获得冠军,满足单调性,所以我们考虑二分答案。 在二分的 check 当中,我们只需要知道我们是否一定获胜。考虑最坏情况,对于我们不知道情况的体育场,我们认为对方没有上场的球员最强在奖金最大的体育场上,次强在奖金次最大上,以此类…

  5. 个人记录

    CSP

    复赛 CSP-S 2023 T1:直接暴力 O(9^5) ; T2:用数组保存该字母上一次出现的地方,然后检查是否可以删除; T3:没做,题目描述篇幅太长难以理解CCF出去。就是一个大模拟,按照题目说的去做就可以了。 T4:赛时看了一下,发现是二分,但是因为一些原因(不想推,ch…

  6. 题解

    潜入行动

    该问题要求在无向树结构中安装k个监听设备,使得所有节点均被监听。每个设备安装在节点u时,会监听其所有相邻节点v,但u本身不被监听。动态规划解法通过四维状态dp[u][i][a][b]表示:当前节点u、已安装i个设备、是否安装设备(a=0/1)、是否被监听(b=0/1)的方案数。状态转移分两种情况: u未被监听:需子节点v安装设备(b=0时,v必须被监听;b=1时,v可自由选择)。 u被监听:若u未安装设备(a=0),则子节点v必须被监听;若u安装设备(a=1),子节点v可任意选择。 通过DFS遍历树,合并子节点状态至父节点,最终答案为根节点被监听的两种情况(安装或未安装设备)的总和,取模10000000007。代码中使用tmp数组临时存储中间状态以避免覆盖。

  7. 题解

    蒟蒻的题解

    本文是作者发布的第一篇题解,旨在解决在区间 [l, r] 内寻找阶乘对 k 取模最大值的问题。由于 k 的值可能较大(可达 10^12),代码中强制使用 long long 类型以防止溢出。算法采用直接模拟结合记忆化数组的方式计算结果。文中提供了带有详细注释以及精简无注释的两个 C++ 代码版本供参考。

    1 赞
  8. 个人记录