该文被密码保护。 阅读全文
posted @ 2023-12-25 22:05 ricky_lin 阅读(0) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2023-11-28 21:42 ricky_lin 阅读(0) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2023-11-27 21:34 ricky_lin 阅读(0) 评论(0) 推荐(0)
摘要: v0.1 upsdate on 2023.11.07 较原版内卷监视工具,增加了一下功能: 计分板(宏观掌控他人的卷题数量和难度分布) 多次连续AC相同题目去重 可能会不定时更新 有什么建议可以提出 code for v0.1 var userlist = ["ricky_lin","Query_F 阅读全文
posted @ 2023-11-07 22:04 ricky_lin 阅读(838) 评论(0) 推荐(0)
摘要: 各类题目解法总结 一、DP 性质: 最优子结构,可拆解并且子问题最优,父问题最优 子问题重复性,一个子问题可能会影响多个不同的下一阶段的原问题 (可以从数位DP中清楚地理解) 无后效性,即此时的之前状态无法直接影响未来的决策 1.1 区间DP 常见数据范围&解题方法: | 数据范围 | 类型 | 解 阅读全文
posted @ 2023-04-05 09:30 ricky_lin 阅读(106) 评论(0) 推荐(1)
摘要: A. Feet codes #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false),cin.tie(0); long long a,b; cin >> a >> b; cout << a 阅读全文
posted @ 2025-12-23 12:06 ricky_lin 阅读(18) 评论(0) 推荐(0)
摘要: A. o-padding code #include<bits/stdc++.h> using namespace std; int main(){ int n; string s,pre = ""; cin >> n >> s; for(int i = s.size()+1; i <= n; ++ 阅读全文
posted @ 2025-12-23 10:46 ricky_lin 阅读(5) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2025-11-11 10:05 ricky_lin 阅读(30) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2025-11-02 16:28 ricky_lin 阅读(9) 评论(0) 推荐(0)
摘要: B. Queue Sorting tag: Dilworth DP 我们可以发现,我们将原序列建图,让小的在前面的数连向大的在后面的数,那么我们就可以将问题转化为:求图中的最小链覆盖是否 \(\leq 2\) 然后我们接着使用 Dilworth 定理,就变成了判断最长反链是否 \(\leq 2\) 阅读全文
posted @ 2025-10-28 14:07 ricky_lin 阅读(30) 评论(0) 推荐(0)
摘要: A. An Easy Geometry Problem tag: 二分Hash 我们令 \(A_i' = A_i - i\times \frac k 2\) 那么我们可以发现: \( \begin{aligned}A_{i+r}' - A_{i-r}' &= A_{i+r} - (i+r)\time 阅读全文
posted @ 2025-10-21 11:33 ricky_lin 阅读(69) 评论(0) 推荐(0)
摘要: B. Basic Graph Algorithm 如果说一个点的相邻节点都走完了,就返回 如果没走完,并且排列中下一个位置和它相邻,就走;如果不相邻,就加边 需要注意的是,对于每一个点的相邻点用 \(vector\) 存储,并且需要按出点在给出排列中的顺序排序,以保证时间复杂度 code #incl 阅读全文
posted @ 2025-10-14 17:29 ricky_lin 阅读(234) 评论(0) 推荐(1)
摘要: A Circle of Apple Trees 即求有多少种大小不同的数 code #include<bits/stdc++.h> using namespace std; const int NN = 108; int t,n; int a[NN]; void solve(){ memset(a, 阅读全文
posted @ 2025-10-11 16:17 ricky_lin 阅读(37) 评论(0) 推荐(0)
摘要: A. OS Versions code #include<bits/stdc++.h> using namespace std; string s; int x,y; int main(){ cin >> s; if(s[0] == 'O') x = 0; else if(s[0] == 'S') 阅读全文
posted @ 2025-10-05 07:48 ricky_lin 阅读(177) 评论(0) 推荐(0)
摘要: A. Be Positive code #include<bits/stdc++.h> using namespace std; const int NN = 1e4; int T; int n,a[NN]; int cnt1,cnt2; void solve(){ cnt1 = cnt2 = 0; 阅读全文
posted @ 2025-10-05 07:39 ricky_lin 阅读(34) 评论(0) 推荐(0)