摘要: E - Heavy Buckets 倍增 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #define no cout << "No" << endl 阅读全文
posted @ 2026-01-10 18:21 arin876 阅读(3) 评论(0) 推荐(0)
摘要: E - Count Sequences 2 不能线性求逆元,模数不一定是素数 用C(n,m) = C(n-1,m-1)+C(n-1,m)预处理组合数 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes 阅读全文
posted @ 2025-12-25 16:38 arin876 阅读(6) 评论(0) 推荐(0)
摘要: AT_abc417_f [ABC417F] Random Gathering 少见的独立切出f 概率期望 对于每个[L,R]区间中的每个盘子 +1/len(sum - x ) 或者 修改为 1/lens + (1-1/len)*0,发现就用区间查询区间修改就可以 #include<bits/stdc 阅读全文
posted @ 2025-12-25 16:18 arin876 阅读(4) 评论(0) 推荐(0)
摘要: D - Pop and Insert 最大的相同段,从两边找,相同就翻转两次丢进去,不同就翻转了丢进去 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl # 阅读全文
posted @ 2025-12-24 14:23 arin876 阅读(7) 评论(0) 推荐(0)
摘要: D - The Simple Game k<=10, 记忆化搜索,状态数2e5*20 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #define no 阅读全文
posted @ 2025-12-19 15:46 arin876 阅读(4) 评论(0) 推荐(0)
摘要: 可算找到了tarjan板子 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define yes cout << "Yes" << endl #define no cout << "No" << endl #define 阅读全文
posted @ 2025-12-17 09:35 arin876 阅读(4) 评论(0) 推荐(0)
摘要: 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 阅读(17) 评论(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 阅读(17) 评论(0) 推荐(0)