树
文章平均质量分 80
CYCKCN
I am a slow walker, but I never walk backwards.
展开
-
树状数组
树状数组原创 2017-01-14 17:15:37 · 466 阅读 · 0 评论 -
HDU 1301 Jungle Roads
HDU 1301 Jungle RoadsProblem DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some ye原创 2017-03-14 22:31:09 · 295 阅读 · 0 评论 -
POJ 3398 Perfect Service
POJ 3398 Perfect ServiceDescriptionA network is composed ofN computers connected by N − 1 communication links such that any two computers can be communicated via a unique route. Two computer原创 2017-03-22 21:27:08 · 550 阅读 · 0 评论 -
CJOJ 2440 大话西游
大话西游Description“大话西游” 是一个在中国非常流行的在线游戏, 由 NIE 公司开发和维护。 这个游戏来源于著名的小说《西游记》 和周星弛的电影, 游戏的背景故事充满奇幻色彩, 引人入胜。游戏里面有很多片区域, 不同的区域由不同的统治者管辖, 其中有一个地方名叫“树国”,由一个妖怪控制着。 这里有 N 个城堡, 每个城堡都有其重要程度值(一个正整数, 不超原创 2017-04-05 21:48:26 · 533 阅读 · 0 评论 -
POJ 3659 Cell Phone Network
POJ 3659 Cell Phone NetworkDescriptionFarmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to set up cell原创 2017-03-22 20:49:54 · 377 阅读 · 0 评论 -
POJ 3164 Command Network
POJ 3164 Command NetworkDescriptionAfter a long lasting war on words, a war on arms finally breaks out between littleken’s and KnuthOcean’s kingdoms. A sudden and violent assault by KnuthOcean原创 2017-03-22 19:14:21 · 366 阅读 · 0 评论 -
HDU 2121 Ice_cream’s world II
HDU 2121 Ice_cream’s world IIProblem DescriptionAfter awarded lands to ACMers, the queen want to choose a city be her capital. This is an important event in ice_cream world, and it also a ve原创 2017-03-21 21:49:59 · 486 阅读 · 0 评论 -
POJ 2152 Fire
POJ 2152 FireDescriptionCountry Z has N cities, which are numbered from 1 to N. Cities are connected by highways, and there is exact one path between two different cities. Recently country Z oft原创 2017-03-28 17:35:31 · 443 阅读 · 0 评论 -
CJOJ 2403 次小生成树
CJOJ 2403 次小生成树Description小 C 最近学了很多最小生成树的算法,Prim 算法、Kurskal 算法、消圈算法等等。 正当小 C 洋洋得意之时,小 P 又来泼小 C 冷水了。小 P 说,让小 C 求出一个无向图的次小生成树,而且这个次小生成树还得是严格次小的,也就是说: 如果最小生成树选择的边集是 EM,严格次小生成树选择的边集是 ES,那么需要满足:(v原创 2017-03-18 17:21:20 · 586 阅读 · 0 评论 -
POJ 1679 The Unique MST
POJ 1679 The Unique MSTDescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V,原创 2017-03-18 15:07:46 · 321 阅读 · 0 评论 -
POJ 2485 Highways
POJ 2485 HighwaysDescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government原创 2017-03-18 09:46:06 · 414 阅读 · 0 评论 -
树链剖分
树链剖分的原理简介考试时遇到的几个树链剖分数据结构练习T4SPOJ375 QTREE修铁路几道树链剖分的练习BZOJ 1036 ZJOI2008树的统计树链剖分的原理简介原创 2017-02-10 11:26:38 · 464 阅读 · 0 评论 -
线段树
## 线段树 ##,原创 2016-12-20 21:34:00 · 433 阅读 · 0 评论 -
CJOJ 2398 简单的数列
简单的数列Description一个简单的数列问题: 给定一个长度为n的数列,求这样的三个元素 ai,aj,ak 的个数,满足 ai<aj>ak,且 i<j<k 。 Input第1行是一个整数n(1接下来n行,每行一个元素ai(0Output一个数,满足 ai<aj>ak (i<j<k) 的个数。原创 2017-03-25 14:41:57 · 638 阅读 · 0 评论