差分约束大坑题 #include<cstdio> #include<cstdlib> #include<algorithm> #include<cstring> #define re register int #define ll long long #define MAXN 100000+10 using namespace std; int n,m; int b[MAXN]; ll d[MAXN]; *MAXN],to[*MAXN],vl[*MAXN],…
Code: #include<cstdio> #include<queue> #include<algorithm> using namespace std; const int N=300000+3; const int INF=-2333233; queue<int>Q; int d[N],inq[N],times[N]; int head[N],to[N<<1],val[N<<1],nex[N<<1]; int cn…