摘要:
1 #include <bits/stdc++.h> 2 #define int long long 3 using namespace std; 4 const int N = 105; 5 const int mod = 1e7 + 9; 6 int n, k; 7 struct node { 阅读全文
摘要:
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } int lcm(int a,int b) { return a / gcd(a, b) * b; } 阅读全文
摘要:
乘法 1 #include <bits/stdc++.h> 2 using namespace std; 3 vector<int> mul(vector<int> &A, vector<int> &B) 4 { 5 vector<int> C(A.size() + B.size()); 6 7 f 阅读全文
摘要:
整数二分 1 /**\ 2 check()函数用来检查是否具有某种性质 3 r = mid 适用于答案往左逼近的情况 4 l = mid 适用于区间答案往右逼近的情况(例如最小最大值) 5 \**/ 6 int bs1(int l, int r) 7 { 8 while (l < r) 9 { 10 阅读全文
摘要:
1 #include <bits/stdc++.h> 2 using namespace std; 3 #define fi first 4 #define se second 5 #define go continue 6 #define woc puts(""); 7 #define int l 阅读全文
摘要:
1 #include <bits/stdc++.h> 2 using namespace std; 3 #define fi first 4 #define se second 5 #define go continue 6 #define woc puts(""); 7 #define int l 阅读全文