码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
Codeforces Round #428 (Div. 2) C-Journey
There are n cities and n?-?1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roads. Theon a ...
分类:其他好文   时间:2020-01-18 16:46:11    阅读次数:79
1月18日 LCA专项训练
A. Lorenzo Von Matterhorn B.Minimum spanning tree for each edge C.Misha, Grisha and Underground D.Fools and Roads E.City Driving 题意:给你一颗基环树(有n条边,n个点的连 ...
分类:其他好文   时间:2020-01-18 15:00:58    阅读次数:97
VJ - H - Almost the shortest route - 图论(反向建图)
https://vjudge.net/contest/351913#problem/H N cities (2 ≤ N ≤ 10 000 ) are connected by a network of M one-way roads (1 ≤ M < 100 000 000 ). It is kno ...
分类:其他好文   时间:2020-01-15 10:04:28    阅读次数:119
DFS
思想 从起点出发,标记走过的点,如果发现没有走过的点,随便选一个向前走,无路可走就回退。 应用 判断从V出发能否走到终点 判断从V出发能否走到终点,若能,记录路径 3、 "ROADS" 很多时候,并不需要一条路走到黑,这就是深搜中的 剪枝 。 4、 "生日蛋糕" "练习1" "练习2" "练习3" ...
分类:其他好文   时间:2020-01-01 23:40:22    阅读次数:105
@codeforces - 1149D@ Abandoning Roads
给定一个 n 点 m 条边的无向连通图,每条边的边权为 a 或 b。 对于 1 ~ n 中的每一个 i,求在所有可能的最小生成树中 1 -> i 的最短路的最小值。 ...
分类:其他好文   时间:2019-11-13 20:39:05    阅读次数:107
Constructing Roads POJ - 2421
题目链接:https://vjudge.net/problem/POJ-2421 思路:一些村庄,建一些路,使得所有村庄能相连,而且使得所有路长度之和最短。 题目说了,有些村庄之间已经建了路,说明有些路我们不需要建,那么在预处理的时候 把那些已经建过边的两个村庄的距离赋值为0,那么在跑最小生成树板子 ...
分类:其他好文   时间:2019-11-08 20:43:44    阅读次数:91
「题解」kuangbin 最小生成树
POJ-1251 Jungle Roads (水题,%c)POJ-1287 Networking (水)POJ-2031 Building a Space Station (%f浮点数尴尬精度,两球间距离)POJ-2421 Constructing Roads (一些边已建好,简单处理一下)ZOJ-... ...
分类:其他好文   时间:2019-10-22 11:23:38    阅读次数:102
HDU 3018 欧拉回路
HDU - 3018 Ant Country consist of N towns.There are M roads connecting the towns. Ant Tony,together with his friends,wants to go through every part of ...
分类:其他好文   时间:2019-10-19 20:29:38    阅读次数:113
CF711D 【Directed Roads】
这是一场比赛的 T4T4 ,身为蒟蒻的我当然没有想出来。 后来对基环树有了一点了解之后就来肝这道题。 首先对于一条边,只有两种情况 1.在环上,那么这个环只有全部正向或全部反向才可以成立,而总方案数显然是 2m ,其中 mm 是环上的边数,所以方案数就是 2m-2 2.不在环上,那么这种边就可以随意 ...
分类:其他好文   时间:2019-10-05 22:49:38    阅读次数:111
[kuangbin带你飞]之'最小生成树 '专题(未完成)
带飞网址: https://vjudge.net/article/187 专题六: POJ 1251 Jungle RoadsPOJ 1287 NetworkingPOJ 2031 Building a Space StationPOJ 2421 Constructing RoadsZOJ 1586 ...
分类:其他好文   时间:2019-10-05 20:02:04    阅读次数:114
729条   上一页 1 2 3 4 5 6 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!