bfs
文章平均质量分 93
bfs
_sky123_
这个作者很懒,什么都没留下…
展开
-
2021牛客暑期多校训练营1 E.Escape along Water Pipe
题目链接 题目描述 You’re trapped into a map with n×mn \times mn×m grids, each grid has a strange water pipe. There are six types of water pipes, denote them as ID 0,1,…,50,1,\dots,50,1,…,5. You are located at the top of grid (1,1){(1,1)}(1,1) and you want to reac原创 2021-07-21 23:11:36 · 197 阅读 · 0 评论 -
2020ICPC EC-Final D. City Brain
题目链接 Prof. Pang works for the City Brain program of Capital Grancel. The road network of Grancel can be represented by an undirected graph. Initially, the speed limit on each road is 111m/s. Prof. Pang can increase the speed limit on a road by 111m/s with原创 2021-05-14 10:36:22 · 625 阅读 · 6 评论 -
Codeforces Round #715 (Div. 2) F. Complete the MST
题目链接 As a teacher, Riko Hakozaki often needs to help her students with problems from various subjects. Today, she is asked a programming task which goes as follows. You are given an undirected complete graph with nnn nodes, where some edges are pre-assigne原创 2021-04-25 19:39:33 · 176 阅读 · 0 评论 -
Educational Codeforces Round 98 (Rated for Div. 2) G. Game On Tree
题目链接 Alice and Bob are playing a game. They have a tree consisting of nnn vertices. Initially, Bob has kkk chips, the iii-th chip is located in the vertex aia_iai (all these vertices are unique). Before the game starts, Alice will place a chip into one of原创 2021-02-17 17:22:22 · 196 阅读 · 0 评论 -
Codeforces Round #669 (Div. 2)E - Egor in the Republic of Dagestan
题目链接 Egor is a famous Russian singer, rapper, actor and blogger, and finally he decided to give a concert in the sunny Republic of Dagestan. There are nnn cities in the republic, some of them are connected by mmm directed roads without any additional condi原创 2020-09-09 15:37:05 · 167 阅读 · 0 评论 -
Birdwatching
Kiara studies an odd species of birds that travel in a very peculiar way. Their movements are best explained using the language of graphs: there exists a directed graph GGG where the nodes are trees, and a bird can only fly from a tree TaT_aTa to TbT_bTb原创 2020-06-13 22:56:37 · 280 阅读 · 0 评论 -
城市排水
在一个n×nn×nn×n的方块城市中,坐标为(i,j)(i,j)(i,j)的位置高度为h[i,j]h[i,j]h[i,j],有mmm个排水井,分别位于(xi,yi)(x_i,y_i)(xi,yi) 在一场大雨中,每个位置的水都会往相邻的积水更低的地方流动,如果无法排出将越积越高 排水井处永远不会积水,水不会通过城市边缘排出(可以理解为城市边缘是无限高的墙) 求每个位置的积水深度 输入描述 第一行输入一个整数TTT,代表有TTT组测试数据 对于每一组测试数据,第一行输入222个整数n,mn,mn,m,接下原创 2020-06-08 19:30:29 · 388 阅读 · 0 评论