二分图博弈[2020CCPC长春H - Combination Lock ]

概念
结论:如果起始点在最大流里,那么先手必胜
否则先手必败。

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]</
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值