摘要: P1257 平面上的最接近点对 这题的数据其实直接暴力枚举就可以了,但是书里是放在分治章节的。 题目越来越难了,我现在感觉真的很吃力😟 点击查看暴力枚举代码 #include<bits/stdc++.h> using namespace std; const int N = 10005; stru 阅读全文
posted @ 2025-05-23 19:06 Chuan81 阅读(2) 评论(0) 推荐(0)
摘要: P1115 最大子段和 点击查看代码 #include<bits/stdc++.h> using namespace std; using ll = long long; const int N = 2e5 + 10; const int INF = 0x3f3f3f3f; int n = 0, a 阅读全文
posted @ 2025-05-21 16:32 Chuan81 阅读(5) 评论(0) 推荐(0)
摘要: P1226 【模板】快速幂 想起了看见“快速幂”三个字一脸懵逼的那个瞬间 后来学了才发现我以前用来心算求幂的方法就叫快速幂啊 点击查看代码 #include<bits/stdc++.h> using namespace std; using ll = long long; ll a, b, p; l 阅读全文
posted @ 2025-05-20 16:19 Chuan81 阅读(6) 评论(0) 推荐(0)
摘要: P1966 [NOIP 2013 提高组] 火柴排队 例题放蓝题还没有题解。。。 点击查看代码 #include<bits/stdc++.h> using namespace std; using ll = long long; const int MOD = 1e8 - 3; int n; vec 阅读全文
posted @ 2025-05-20 15:48 Chuan81 阅读(3) 评论(0) 推荐(0)
摘要: P4552 [Poetize6] IncDec Sequence 这题其实很有意思,当diff[2, n]都为0时,数组全等于a[1] 点击查看代码 #include<bits/stdc++.h> using namespace std; using ll = long long; int main 阅读全文
posted @ 2025-05-19 16:38 Chuan81 阅读(4) 评论(0) 推荐(0)
摘要: P2882 [USACO07MAR] Face The Right Way G 好难啊~ 点击查看代码 #include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n + 1), f 阅读全文
posted @ 2025-05-19 16:25 Chuan81 阅读(7) 评论(0) 推荐(0)
摘要: P1163 银行贷款 浮点二分 点击查看代码 #include<bits/stdc++.h> using namespace std; using ll = long long; int main() { double n, m, k; cin >> n >> m >> k; double left 阅读全文
posted @ 2025-05-19 12:56 Chuan81 阅读(7) 评论(0) 推荐(0)
摘要: P1182 数列分段 Section II 不知道long long不开有没有影响,left的值必须是最大的\(A_i\) 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N = 100010; int n, m; vect 阅读全文
posted @ 2025-05-19 12:47 Chuan81 阅读(3) 评论(0) 推荐(0)
摘要: P3853 [TJOI2007] 路标设置 这题目真恶心,第一眼看过去以为0和L会给在数组里面 点击查看代码 #include <bits/stdc++.h> using namespace std; const int N = 100010; int l, n, k; vector<int> p; 阅读全文
posted @ 2025-05-19 11:25 Chuan81 阅读(1) 评论(0) 推荐(0)
摘要: P2678 [NOIP 2015 提高组] 跳石头 调半天ans更新位置错了。 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N = 50010; int l, n, m; vector<int>s(N); bool ch 阅读全文
posted @ 2025-05-19 10:22 Chuan81 阅读(6) 评论(0) 推荐(0)