11 2021 档案
摘要:01矩阵求最大全1的矩形和正方形 #include<bits/stdc++.h> using namespace std; const int N = 2020; int l[N][N],r[N][N],u[N][N]; bool a[N][N]; int main(){ int n,m; cin
阅读全文
摘要:struct Flow { static constexpr int INF = 1e9; int n; struct Edge { int to, cap; Edge(int to, int cap) : to(to), cap(cap) {} }; std::vector<Edge> e; st
阅读全文
摘要:const int S=8;//随机算法判定次数一般8~10就够了 //计算 ret=(a*b)%c a,b,c<2^63 ll mult_mod(ll a,ll b,ll c) { a%=c; b%=c; ll ret=0; ll tmp=a; while(b) { if(b&1) { ret+=
阅读全文
摘要:int n;const int N=4e5;const int LOGN=22; namespace ST{ const int M=N*LOGN; int son[M][2],ct[M]; int node_count; int new_node(int ls,int rs,int cnt){ i
阅读全文
摘要:num = sqrt(n); for (int i = 1; i <= num; i++) st[i] = n / num * (i - 1) + 1, ed[i] = n / num * i; ed[num] = n; for (int i = 1; i <= num; i++) { for (i
阅读全文