ans
-
2022.8.13 颓废记录
Preface 最后一天~ Content [CF1175E]Minimal Segment Cover 给定形如 /([l,r]/) 的 /(n/) 条线段。/(m/) 次询问,…
-
砍树
P1873 [COCI 2011/2012 #5] EKO / 砍树 – 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 二分高度 judge中把比这个高…
-
单调栈
P5788 【模板】单调栈 – 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 题意:返回数组中第一个大于第i个元素的数的下标 单调栈(栈中元素满足单调性…
-
天下第一
P5635 【CSGRound1】天下第一 – 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 误区:第一次记录用的数组开三层,分别表示x,y,和第几回合…
-
一些杂项算法
KMP 代码实现 时间复杂度/(O(n + m)/) int n, m; int next[M + 1], f[N + 1]; char s[N + 2], p[M + 2]; v…
-
1103. Integer Factorization (30)-PAT甲级真题(dfs深度优先)
The K-P factorization of a positive integer N is to write N as the sum of the P-th power o…
-
LeetCode 90 Subsets II 回溯
Given an integer array nums that may contain duplicates, return all possible subsets (the …
-
LeetCode 797 All Paths From Source to Target 回溯
Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n – 1, find all possible…
-
「学习笔记」矩阵乘法与矩阵快速幂
「学习笔记」矩阵乘法与矩阵快速幂 点击查看目录 目录 「学习笔记」矩阵乘法与矩阵快速幂 矩阵乘 算法 代码 矩阵快速幂 算法 用处 代码(模板题) 练习题 斐波那契数列 思路 代码…
-
来自学长的推荐
A. Set 还做过类似的题,但是真的忘了 发现该题特殊点在于有 /(n/) 个数,求能被 /(n/) 整除的,明明是两个看似无关的数据,却给了同一个值,那么这里就是解题的关键 我…