04 2022 档案

摘要:3797. 最大化最短路 题意 给定一个无向图,所有边权都为1,给定 \(k\) 个特殊点。 现要在这 \(k\) 个特殊点中选定两个连一条权值为1边,求连边后从 \(1\) 到 \(N\) 的最短路最大值是多少。 思路 正反跑一次bfs,可以发现在特殊点 \(i,j\) 之间加一条边后会产生一条长 阅读全文
posted @ 2022-04-29 11:04 Mxrurush 阅读(50) 评论(0) 推荐(0)
摘要:2022天梯赛 L2-3 龙龙送快递 题意 给一棵树,和若干次询问。每次询问给出一个询问节点。 对第 \(i\) 次询问,要求出从根访问遍前 \(i\) 个询问节点的最短路径,树的边权都是1。 思路 考虑一条边最多经过几次。 显然,对树上任意一条边,经过次数总小于等于2。 经过次数为2一定是因为处理 阅读全文
posted @ 2022-04-26 14:55 Mxrurush 阅读(103) 评论(0) 推荐(0)
摘要:A to F1 阅读全文
posted @ 2022-04-25 23:33 Mxrurush 阅读(75) 评论(0) 推荐(0)
摘要:from cgi import print_form from math import log from msilib import datasizemask import os from matplotlib import pyplot as plt import numpy as np impo 阅读全文
posted @ 2022-04-25 17:57 Mxrurush 阅读(53) 评论(0) 推荐(0)
摘要:数据结构 玄学数据结构——珂朵莉树 struct Node { int l,r;// [l,r] mutable int v; // 需要维护的信息 Node(int LL ,int rr = -1,int vv = 0):l(LL), r(rr),v(vv){} bool operator<(co 阅读全文
posted @ 2022-04-12 22:59 Mxrurush 阅读(121) 评论(0) 推荐(0)
摘要:是作业 阅读全文
posted @ 2022-04-07 10:32 Mxrurush 阅读(60) 评论(0) 推荐(0)
摘要:实验代码 阅读全文
posted @ 2022-04-02 21:55 Mxrurush 阅读(129) 评论(0) 推荐(0)