摘要: D - 183184 非常好的推式子 被at卡sqrt了 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #define no cout << "No" 阅读全文
posted @ 2025-12-08 00:45 arin876 阅读(8) 评论(0) 推荐(0)
摘要: D - On AtCoder Conference 环形 二分 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #define no cout << "N 阅读全文
posted @ 2025-12-08 00:38 arin876 阅读(6) 评论(0) 推荐(0)
摘要: P13968 [VKOSHP 2024] Classics 倒着找每个的最终位置,二分+树状数组求第k大,这样把序列搞出来 再找最长上升子序列,从小往大往树状数组里面加,找前面的最长上升子序列+1 不可以从前往后往树状数组里加,找比他小的的最长上升子序列+1,加入的顺序不对 #include<bit 阅读全文
posted @ 2025-12-04 17:29 arin876 阅读(21) 评论(0) 推荐(0)
摘要: F1. Cycling (Easy Version) #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #define no cout << "No" << 阅读全文
posted @ 2025-11-22 19:18 arin876 阅读(19) 评论(0) 推荐(0)
摘要: D - Neighbor Distance set模拟 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #define no cout << "No" < 阅读全文
posted @ 2025-11-19 14:25 arin876 阅读(17) 评论(0) 推荐(0)
摘要: D - Robot Customize 头部最多m/2,对于头部做背包,最初是全放在身体上,一步一步换代价 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl 阅读全文
posted @ 2025-11-11 08:09 arin876 阅读(19) 评论(0) 推荐(0)
摘要: B4080 [语言月赛 202412] 聪明猪猪大赛 签到 P10114 [LMXOI Round 1] Size 诈骗qaq,值域个数是sqrt(n)级别的,暴力 #include<bits/stdc++.h> using namespace std; #define endl '\n' #def 阅读全文
posted @ 2025-11-05 21:54 arin876 阅读(12) 评论(0) 推荐(0)
摘要: Maximum Subarray Sum 将所有的0位置填-1e18,就不用分段求最大值m k<m,不行,怎么加都可以取当前的一段达到m k==m,就这样就可以 k>m,可以这样构造 找到最左边的0,前缀和后缀最大加上他是k即可,别的再怎么加也达不到k #include<bits/stdc++.h> 阅读全文
posted @ 2025-11-01 12:15 arin876 阅读(8) 评论(0) 推荐(0)
摘要: D - Santa Claus 2 map<int,set> E - Snowflake Tree 开始想到枚举中心点,x=度数,y=min儿子度数-1,其余全要删除,删除越少留下越多,留下1+x+xy,删n-(1+x+xy) 样例1告诉我们可以删除某个子树,这样还是y=min儿子度数-1,就排序, 阅读全文
posted @ 2025-10-29 22:57 arin876 阅读(9) 评论(0) 推荐(0)
摘要: D - 2x2 Erasing 2 状压 E - Cut in Half 暴力,O(nlogK) #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #def 阅读全文
posted @ 2025-10-29 22:48 arin876 阅读(10) 评论(0) 推荐(0)