摘要:
#include<bits/stdc++.h> #define int long long using namespace std; int n,m,t,k,d,c,dp[5005][5005],x,y,z,a[5005][5005],s[5005][5005]; signed main(){ sc 阅读全文
摘要:
最短路dijkstra证明: https://zhuanlan.zhihu.com/p/163258455 阅读全文
摘要:
第一版 err #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<cmath> #define N 505 using namespace std; i 阅读全文
该文被密码保护。 阅读全文
摘要:
牛的旅行 #include<bits/stdc++.h> using namespace std; int read(){ int f=1,x=0; char c=getchar(); while(c<'0'||c>'9'){if(c=='-') f=-1; c=getchar();} while( 阅读全文
摘要:
字符串套 递归 #include<bits/stdc++.h> using namespace std; char s[1005]; int n,i; string work(){ string p; int t = 0; while(++i <= n){ if(s[i] >= '0' && s[i 阅读全文
摘要:
有一个N个节点的树,其中点1是根。初始点权值都是0。 一个节点的深度定义为其父节点的深度+1,。特别的,根节点的深度定义为1。 现在需要支持一系列以下操作:给节点u的子树中,深度在l和r之间的节点的权值(这里的深度依然从整个树的根节点开始计算),都加上一个数delta。 问完成所有操作后,各节点的权 阅读全文