上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页
摘要: P8761 [蓝桥杯 2021 国 BC] 大写 #include<bits/stdc++.h> using namespace std; #define int long long using vi = vector<int>; using i32 = int32_t; using pii = p 阅读全文
posted @ 2024-01-26 19:15 PHarr 阅读(21) 评论(0) 推荐(0) 编辑
摘要: A-Flower 因为时间各不相同,所以时间是假的,直接去最大\(k\)个就行 #include<bits/stdc++.h> using namespace std; #define int long long using vi = vector<int>; using i32 = int32_t 阅读全文
posted @ 2024-01-26 18:39 PHarr 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 7-1 最好的文档 #include <bits/stdc++.h> using namespace std; using i32 = int32_t; i32 main() { ios::sync_with_stdio(false), cin.tie(nullptr); cout << "Good 阅读全文
posted @ 2024-01-26 18:15 PHarr 阅读(4) 评论(0) 推荐(0) 编辑
摘要: E. Matrix Distances 因为行列的贡献是独立的,所以可以按照颜色分别统计 #include <bits/stdc++.h> using namespace std; #define int long long using i32 = int32_t; using vi = vecto 阅读全文
posted @ 2023-12-06 22:01 PHarr 阅读(452) 评论(0) 推荐(1) 编辑
摘要: A. Rook #include <bits/stdc++.h> using namespace std; #define int long long using pii = pair<int, int>; using node = pii; using i32 = int32_t; void so 阅读全文
posted @ 2023-12-06 16:29 PHarr 阅读(247) 评论(0) 推荐(0) 编辑
摘要: A. Modulo Ruins the Legend 首先题目要求的是$(\sum (a_i + s + i \times d))% m $的最小值 等价于求\((\sum a_i + n\times s + \frac{n(n+1)}{2} \times d) \%m\)的最小值 令\(sum = 阅读全文
posted @ 2023-12-06 15:04 PHarr 阅读(9) 评论(0) 推荐(0) 编辑
摘要: A. Orders 按照订单的结束时间排序,然后遍历一遍即可 #include<bits/stdc++.h> using namespace std; #define int long long using pii = pair<int, int>; using i32 = int32_t; voi 阅读全文
posted @ 2023-12-04 22:12 PHarr 阅读(56) 评论(0) 推荐(0) 编辑
摘要: A. Beth's Cookies n = int(input()) s = input() res = [] for i in s : if res == []: res.append(i) elif i == '(': if res[-1] == ')': res.append("*") res 阅读全文
posted @ 2023-12-04 14:21 PHarr 阅读(45) 评论(0) 推荐(1) 编辑
摘要: A - 2UP3DOWN #include<bits/stdc++.h> using namespace std; #define int long long void solve() { int a, b; cin >> a >> b; if (a < b and b - a <= 2) cout 阅读全文
posted @ 2023-11-26 19:25 PHarr 阅读(21) 评论(0) 推荐(0) 编辑
摘要: A - First ABC 2 #include <bits/stdc++.h> using namespace std; #define int long long #define mp make_pair using vi = vector<int>; using pii = pair<int, 阅读全文
posted @ 2023-11-26 17:44 PHarr 阅读(6) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页