摘要:
幂的运算 题目:给定a, b, c, 求 \(a^{b}\) 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
阅读(83)
评论(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
阅读(52)
评论(0)
推荐(0)
浙公网安备 33010602011771号