摘要:
不知道为什么只有40分。~~好吧,是距离公式括号打错了。。。。。。。。。~~ 距离其实可以不用开根号,直接比较平方大小。 cpp include include include include include define ll long long define N 10001 using name 阅读全文
摘要:
Description: 给出一个N个顶点M条边的无向无权图,顶点编号为1−N。问从顶点11开始,到其他每个点的最短路有几条。只需要输出 ans mod 100003 后的结果即可。如果无法到达顶点i则输出0。 Analysis: 因为所有的边权都为1,所以一个点的最短路就相当于是它在BFS搜索树中 阅读全文
摘要:
左偏树(Leftist tree) 性质 节点的键值小于或等于左右子节点的键值。这是左偏树的堆性质。 节点的左子节点的距离不小于右子节点的距离。 节点的距离等于它的右子节点距离加一。 cpp include include include include define N 200001 using 阅读全文
摘要:
Code cpp include include include include using namespace std; typedef long long ll; ll n; const int mod = 1000000007; struct Matrix{ int r,c; ll data[ 阅读全文
摘要:
Code cpp include include include define N 1010 define W 1010 using namespace std; int dp[W],v[N],w[N],n,m,p; bool Check(int x) { memset(dp,0,sizeof(dp 阅读全文