摘要:
```#include#include#include#include#includeusing namespace std;const int N=111111;int f[N][21];int e[N],ne[N],h[N],idx,w[N];int n,m,s,t,k;void add(int a,int b,int c){ e[idx]=b; w[idx]=c; ne[idx]=h[a];... 阅读全文
摘要:
```#include#include#include#includeusing namespace std;const int N=210;int f[N][N];int e[N],ne[N],h[N],idx,w[N];int n,m;void add(int a,int b,int c){ e[idx]=b; w[idx]=c; ne[idx]=h[a]; h[a]=idx++;}void ... 阅读全文
摘要:
``` #include #include #include #include #include #include using namespace std; const int N=50000*2; const int mod=100000000; int n,m,b; int e[N],ne[N],idx,h[N],w[N]; int fi[N]; const int inf=0x3f3f3f3 阅读全文
摘要:
``` #include #include #include #include #include using namespace std; const int N=15,M=1state[N]; bool check(int k,int state) { for(int i=0; i>i&1 && state>>i+1&1))||((state>>i&1 && !g[k][m-i]))) retu 阅读全文
摘要:
```#include#include#include#includeusing namespace std;typedef long long ll;const int N=15,K=110,M=1head[M];vectorstate;bool check(int x){ for(int i=0; i+1>i&1) && (x>>i+1&1)) return false; return t... 阅读全文
摘要:
``` #include #include #include #include using namespace std; const int N=310; int n,m; int h[N],e[N],ne[N],idx; int w[N]; int f[N][N]; void add(int a,int b) { e[idx]=b; ne[idx]=h[a]; h[a]=idx++; } voi 阅读全文