题目: UOJ也能评测 题解 请看代码 #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> typedef long long ll; using namespace std; ; int n,m,Q,q,V[N],col[N],sum[N],last[N],blk[N]; ]; int Tp[N],A[N],B[N],cc[N]; ],go[N*]; ll cur,a…
http://www.lydsy.com/JudgeOnline/problem.php?id=3052 题意:n个带颜色的点(m种),q次询问,每次询问x到y的路径上sum{w[次数]*v[颜色]},可以单点修改颜色.(n, m, q<=100000) #include <bits/stdc++.h> using namespace std; const int N=100005, M=100005; typedef long long ll; inline int getint()…