
dfs相关笔记
大橘为重eleven
每天都因为自己太菜了而自闭
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
E 缆车
题目描述:在远离大陆的太平洋上,有一个风景优美的小岛。传说,小岛上的文明是这样发展起来的。第一代人沿着岛的坡度选择了n 个定居点,编号为1,2,…,n. 其中编号 i 定居点的高度就是i米。他们在定居点的附近修建了房屋,开辟了农田,种植了植物。第二代人在 n 个定居点之间修建了n-1条小路,每条小路连接两个定居点,且任意两个定居点之间都可以通过小路相互到达,互通有无。各个定居点不仅高度不同,而且...原创 2019-06-05 21:09:31 · 338 阅读 · 0 评论 -
数独
数独玩数独的一个作弊方法用c++实现数独的解法使用方法:输入9*9的一组数字,有相应的数字的输入该数字,没有的话在该位置输入0在较短的时间内算出该解(反正比我快)输入样例:8 0 0 0 0 0 0 0 0 0 0 3 6 0 0 0 0 0 0 7 0 0 9 0 2 0 0 0 5 0 0 0 7 0 0 0 0 0 0 0 4 5 7 0 0 0 0 0 1 0 0 ...原创 2019-06-13 19:18:57 · 663 阅读 · 0 评论 -
Prime Ring Problem
题目描述:A ring is compose of n circles as shown in diagram. Put natural number 1, 2, …, n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.Note: the number ...原创 2019-07-31 09:18:23 · 216 阅读 · 0 评论 -
Mountain Walking
题目描述:Farmer John and Bessie the cow have embarked on one of those ‘active’ vacations. They spend entire days walking in the mountains and then, at the end of the day, they tire and return to their va...原创 2019-07-31 09:29:40 · 261 阅读 · 0 评论 -
滑雪
题目描述:Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12...原创 2019-07-31 11:22:27 · 153 阅读 · 0 评论 -
Qin Shi Huang's National Road System(次小生成树)
题目描述:During the Warring States Period of ancient China(476 BC to 221 BC), there were seven kingdoms in China ---- they were Qi, Chu, Yan, Han, Zhao, Wei and Qin. Ying Zheng was the king of the kingdo...原创 2019-08-21 20:44:26 · 385 阅读 · 0 评论