摘要:
看不懂题解的再问我 A #include <bits/stdc++.h> using namespace std; #define endl '\n' #define LL long long #define ph push_back #define INF 0x3f3f3f3f #define P 阅读全文
摘要:
求每个数的最大质数用埃氏筛法,时间复杂度 O(nlognlogn) void get_primes(int n) { for (int i = 2; i <= n; i ++) if (!st[i]) { maxp[i] = i; for (int j = i + i; j <= n; j += i 阅读全文
摘要:
getline与stringstream的用法 https://www.acwing.com/problem/content/922/ #include <bits/stdc++.h> using namespace std; const int N = 505; int n, m; int dis 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; int n, m; int w[N]; struct node { int l, r; LL sum, add; }tr[N * 4]; void pushup( 阅读全文