- 博客(10)
- 收藏
- 关注
原创 CodeForces - 298D Fish Weight(思维)
It is known that there are k fish species in the polar ocean, numbered from 1 to k. They are sorted by non-decreasing order of their weight, which is a positive number. Let the weight of the i-th type...
2018-11-28 13:12:18 171
原创 最大流模板(一)BFS
Drainage Ditches 参考博客用这篇博客学习了一下bfs求解最大流,然后先做一下笔记。(以下均为笔者自己理解,有不对之处还望大佬指出)首先,我们学习最大流就要先了解什么是最大流。最大流问题定义:管道网络中每条边的最大通过能力(容量)是有限的,实际流量不超过容量。最大流问题(maximum flow problem),一种组合最优化问题,就是要讨论如何充分利用装置的能力,使得运输...
2018-11-27 13:35:13 489
原创 POJ - 1947 - Rebuilding Roads(树形dp )
The cows have reconstructed Farmer John’s farm, with its N barns (1 <= N <= 150, number 1…N) after the terrible earthquake last May. The cows didn’t have time to rebuild any extra roads, so now ...
2018-11-16 19:21:52 162
原创 CodeForces - 264A - Escape from Stones(栈和队列的应用)
Squirrel Liss lived in a forest peacefully, but unexpected trouble happens. Stones fall from a mountain. Initially Squirrel Liss occupies an interval [0, 1]. Next, n stones will fall and Liss will esc...
2018-11-14 10:51:48 206
原创 hdu-2376 - Average distance(树形dp )
Given a tree, calculate the average distance between two vertices in the tree. For example, the average distance between two vertices in the following tree is (d 01 + d 02 + d 03 + d 04 + d 12 +d 13 +...
2018-11-14 10:28:04 159
原创 CodeForces - 260 - BAncient Prophesy(暴力)
A recently found Ancient Prophesy is believed to contain the exact Apocalypse date. The prophesy is a string that only consists of digits and characters “-”.We’ll say that some date is mentioned in t...
2018-11-13 09:34:11 183
原创 CodeForces - 260A - Adding Digits(思维)
Vasya has got two number: a and b. However, Vasya finds number a too short. So he decided to repeat the operation of lengthening number a n times.One operation of lengthening a number means adding ex...
2018-11-13 09:27:23 239
原创 POJ - 1850 Code(排列组合)
Transmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A well known system is that one where a number is associated to a char...
2018-11-08 17:09:54 177
原创 HDU - 1465 - 不容易系列之一(递推,)
大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了!做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把40个单项选择题全部做错了!大家都学过概率论,应该知道出现这种情况的概率,所以至今我都觉得这是一件神...
2018-11-05 16:41:38 210
原创 HDU - 4349 - Xiao Ming's Hope(Lucas定理)
Xiao Ming likes counting numbers very much, especially he is fond of counting odd numbers. Maybe he thinks it is the best way to show he is alone without a girl friend. The day 2011.11.11 comes. Seein...
2018-11-05 16:14:14 148
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人