08 2024 档案

摘要:幂的运算 题目:给定a, b, c, 求 ab mod c。 分析:快速幂板子题 代码: #include <bits/stdc++.h> using namespace std; const int N = 2e5 + 10; long long n, m, k; long long 阅读全文
posted @ 2024-08-16 10:39 forleaves 阅读(35) 评论(0) 推荐(0) 编辑
摘要:求和问题 题目:给n个数,输出最长的前缀长度,使得前缀的和大于等于 0。 分析:前缀和,找到最大的位置 代码: #include <bits/stdc++.h> using namespace std; const int N = 2e5 + 10; int n; long long s[N], f 阅读全文
posted @ 2024-08-16 10:39 forleaves 阅读(25) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示