Preface
随机跳题。
我现在真的暴怒。leetcode 这勾八 OJ 每组数据每次不会重新编译,而是会反复调用一个方法 😅。导致我的全局数组从来不清零。😅
题面
https://leetcode-cn.com/problems/longest-arithmetic-subsequence/
题解
先推个朴素的方程。设
Preface
随机跳题做到了这道。
题目
https://www.luogu.com.cn/problem/P2899
题解
其实就是交叉染色。我们考虑每棵子树的情况。设
Preface
Leetcode 随机 hard 题计划。来看看 hard 到底 hard 不 hard。反正好像是没看出 hard 来。
题目
https://leetcode-cn.com/problems/minimum-skips-to-arrive-at-meeting-on-time/
题解
直接推方程。设
题面
题目:
https://oi.edu.pl/static/attachment/20110713/ceoi-2011.pdf
http://ceoi.inf.elte.hu/tasks-archive/
测试传送门:
https://www.luogu.com.cn/problem/P4700
题解
首先分析复杂度,我们需要在