The 2019 China Collegiate Programming Contest Harbin Site A. Artful Paintings 差分约束模板
#include<bits/stdc++.h>using namespace std;const int N=3010;const int INF=1e9;int dist[N];struct node{ int u,v,cost;};struct node2{ int l,r,k;};vector<node>E;vector<node2>g1,g2;bool bf(int st,int n){ for(int i=1;i<=n;i++)