AtCoder abc352
E
Problem Statement
You are given a weighted undirected graph
You will perform
- You are given a subset of vertices
consisting of vertices. For every pair such that and , add an edge between vertices and with weight .
After performing all
赛时用并查集做连通图的判断,用优先队列维护每一个点的最小连接边(仅值),但想不出如何生成最小生成树,维护信息不足
F
Problem Statement
There are
A competition was held among these
- Each person has a unique rank.
- For each
, if person is ranked -th and person is ranked -th, then .
The given input guarantees that there is at least one possible ranking that does not contradict the given information.
Answer
- If the rank of person
can be uniquely determined, return that rank. Otherwise, return .
这应该是真的难题,赛时也才过了480个人,初步想法为带权并查集维护一条奇怪的链,带着缺口的链,然后几根链子来判断最后的答案
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)