- 博客(10)
- 收藏
- 关注
原创 并查集的应用--洛谷P1111修复公路
P1111修复公路题目背景A地区在地震过后,连接所有村庄的公路都造成了损坏而无法通车。政府派人修复这些公路。题目描述给出A地区的村庄数N,和公路数M,公路是双向的。并告诉你每条公路的连着哪两个村庄,并告诉你什么时候能修完这条公路。问最早什么时候任意两个村庄能够通车,即最早什么时候任意两条村庄都存在至少一条修复完成的道路(可以由多条公路连成一条道路)输入格式第1行两个正整数N,M下面M行,每行3个正整数x, y, t,告诉你这条公路连着x,y两个村庄,在时间t时能修复完成这条公路。输出格式如
2022-05-26 16:24:59 220
原创 Codeforces Round #787 D. Vertical Paths
[Codeforces Round #787]D. Vertical PathsYou are given a rooted tree consisting of nn vertices. Vertices are numbered from 11 to nn. Any vertex can be the root of a tree.A tree is a connected undirected graph without cycles. A rooted tree is a tree with
2022-05-18 20:14:43 395
原创 Codeforces Round#787 A. Food for Animals
[Codeforces Round #787 (Div. 3)]A. Food for Animalstime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputIn the pet store on sale there are:a packs of dog food;b packs of cat food;c packs of univ
2022-05-15 13:24:57 484
原创 Codeforces Round #787 (Div. 3) C. Detective Task
Codeforces Round #787 (Div. 3)C. Detective Tasktime limit per test:2 secondsmemory limit per test:256 megabyteinput :standard input ;output :standard outputPolycarp bought a new expensive painting and decided to show it to his n friends. He hung it i
2022-05-15 12:46:05 421
空空如也
关于#c++#的问题:pta L1-049 天梯赛座位分配
2023-04-21
TA创建的收藏夹 TA关注的收藏夹
TA关注的人