码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
Roads in the Kingdom CodeForces - 835F (直径)
大意: 给定一个基环树, 求删除一条环上的边使得直径最小. 直径分两种情况 环上点延伸的树内的直径 两个环上点的树内深度最大的点匹配 第一种情况直接树形dp求一下, 第二种情况枚举删除的环边, 线段树维护一下即可. ...
分类:其他好文   时间:2019-10-05 00:35:56    阅读次数:85
Jungle Roads——最小生成树
题目链接 题意: 把各个岛屿看成一个点,求各个岛屿之间权值最小的路径(最小生成树) 对于数据 数据输入的第一行n代表岛屿的个数,当为0时程序结束。 接着n-1行开始为岛屿的编号,用大写字母表示,接着是一个整数k,表示与该岛屿连接的岛屿个数,然后该行输入m对数据 字母表示岛屿编号 接着一个整数w表示, ...
分类:其他好文   时间:2019-10-02 10:31:50    阅读次数:74
Dudu's maze
23.7% 1000ms 262144K To seek candies for Maomao, Dudu comes to a maze. There are nn rooms numbered from 11 to nn and mm undirected roads. There are tw ...
分类:其他好文   时间:2019-09-15 01:03:26    阅读次数:100
bzoj 1123
Description Byteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的road. 所有towns连通。 Byteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的r ...
分类:其他好文   时间:2019-08-31 21:24:40    阅读次数:98
poj 3352
It's almost summer time, and that means that it's almost summer construction time! This year, the good people who are in charge of the roads on the tr ...
分类:其他好文   时间:2019-08-31 21:06:14    阅读次数:95
poj2431Expedition
A group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cows unfortunately managed to run o ...
分类:其他好文   时间:2019-08-22 16:07:12    阅读次数:97
替换字符串括号外的所有特殊字符(括号内的不能替换)
eg:用-替-换字符串里的特殊字符,并进行切分(括号里的不能替换) String roads = "G6包头..。?九原收费站((这个是.。--.。?测试)——210国道——幸福南路(备注:车、货、路线不变,往-返)——210国道(((aa)——210国道(这样呢)"; 一。思路:1.找到括号的区间 ...
分类:其他好文   时间:2019-08-21 11:36:04    阅读次数:115
floyd类型题UVa-10099-The Tourist Guide +Frogger POJ - 2253
The Tourist Guide Mr. G. works as a tourist guide. His current assignment is to take some tourists from one city to another. Some two-way roads connec ...
分类:其他好文   时间:2019-08-16 22:45:48    阅读次数:123
POJ 1251 Jungle Roads
题目链接:https://vjudge.net/problem/POJ-1251 题目大意 略。 分析 最小生成树模板题,数据规模也很小,这里我用了 Prim 算法。 代码如下 1 #include <cmath> 2 #include <ctime> 3 #include <iostream> 4 ...
分类:其他好文   时间:2019-08-02 20:50:52    阅读次数:86
POJ3067:Japan(树状数组求逆序对)
Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the ...
分类:编程语言   时间:2019-07-30 00:17:13    阅读次数:151
729条   上一页 1 ... 3 4 5 6 7 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!