算法设计-构造问题
lab104_yifan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVA 769 - Magic of David Copperfield(构造问题)
Magic of David Copperfield The well-known magician David Copperfield loves to show the following trick: a square with N rows and Ncolumns of different pictures appears on a TV screen. Le原创 2014-01-02 10:45:41 · 1878 阅读 · 0 评论 -
UVA 11387 - The 3-Regular Graph(构造问题+推理证明)
I I U C O N L I N E C O N T E S T 2 0 0 8Problem C: The 3-Regular GraphInput: standard inputOutput: standard output The degree of a vertex in a graph原创 2014-01-12 17:38:07 · 1625 阅读 · 0 评论 -
UVA 11920 - 0 s, 1 s and ? Marks(贪心)
0 s, 1 s and ? Marks Given a string consisting of 0, 1 and ? only, change all the ? to 0/1, so that the size of the largest group is minimized. A group is a substring that contains eit原创 2014-01-13 13:57:30 · 1210 阅读 · 0 评论 -
UVA 502 - DEL command(贪心构造)
DEL command It is required to find out whether it is possible to delete given files from MS-DOS directory executing the DEL command of MS-DOS operation system only once. There are no nes原创 2014-01-13 10:56:01 · 1205 阅读 · 0 评论 -
UVA 668 - Parliament(贪心构造)
Parliament New convocation of The Fool Land's Parliament consists of N delegates. According to the present regulation delegates should be divided into disjoint groups of different sizes原创 2014-01-14 00:05:10 · 2521 阅读 · 0 评论 -
UVA 10821 - Constructing BST(贪心构造)
UVA 10821 - Constructing BST题目链接题意:有1 - n的数字,要构造一棵高度不超过h的BST,并且要字典序最小的,输出序列思路:贪心构造,既然字典序最小,那么每个子树的根都要尽量小,那么也就是右子树尽量填满,按照这个策略去dfs构造即可代码:#include #include #include using namespace原创 2014-08-25 14:53:31 · 1302 阅读 · 0 评论
分享