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