11 2022 档案
摘要:#include <bits/stdc++.h> using namespace std; const int N = 210, INF = 1e9; int n, m, Q; int d[N][N]; void floyd() { for (int k = 1; k <= n; k++) { fo
阅读全文
摘要:f[i][j]表示第i列有来自上一列的j(用二进制表示有几行就有几位,1表示突起,0表示没有突起)的突起时有几种摆放方式 在确定几行几列的图之后,先预处理st数组,这个数组是确定每一列可以怎么放(不能有奇数个连续的0) 比如在n=4的时候 有十五个状态 st[0] = 1, st[1] = 0, s
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100010; int n; int q[N], tmp[N]; LL merge(int l, int r){ if (l >= r)
阅读全文
摘要:就是三重暴力解,每一组里面挑选一个 #include<bits/stdc++.h> using namespace std; const int N = 110; int n, m; int v[N][N], w[N][N], s[N]; int f[N]; int main() { cin >>
阅读全文