概念
结论:如果起始点在最大流里,那么先手必胜
否则先手必败。
2020CCPC长春H
这道题卡常
#include<iostream>
#include <cstring>
#include <cmath>
#include <map>
#include <vector>
#include <algorithm>
#include <set>
#define int ll
using namespace std;
typedef long long ll;
const int M = 2e6 + 5;
const int N = 2e5 + 5;
const int INF = 0x3f3f3f3f;
int tot,len;
int fac[]={
1,10,100,1000,10000,100000,1000000};
int vis[N];
struct node
{
int v,w,to;
} edge[M*2];
int pre[N],cnt,dep[N];
int S,T,z,head[N],sum,id;
int n,m,q[N],cur[N];
void add(int u,int v,int w)
{
edge[cnt]= {
v,w,head[u]</