码迷,mamicode.com
首页 >  
搜索关键字:placing lampposts    ( 127个结果
51. N-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all ...
分类:其他好文   时间:2016-04-03 14:28:26    阅读次数:162
LeetCode - N-Queens
题目:The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return al...
分类:其他好文   时间:2015-12-26 18:25:36    阅读次数:155
PO J 2528 Mayor's posters (线段树+离散化)
DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral poster...
分类:其他好文   时间:2015-08-17 21:25:13    阅读次数:151
Django的模板系统
1.一个简单的模板例子:Ordering noticeOrdering noticeDear {{ person_name }},Thanks for placing an order from {{ company }}. It's scheduled toship on {{ ship_date...
分类:其他好文   时间:2015-08-12 19:07:03    阅读次数:140
仿oschina 主界面的实现(一) -------FragmentTabHost+Fragment
FragmentTabHost+Fragment 官网的API dome Special TabHost that allows the use of Fragment objects for its tab content. When placing this in a view hierarchy, after inflating the hierarchy you must ca...
分类:其他好文   时间:2015-08-11 12:15:25    阅读次数:170
[LeetCode] N-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all d...
分类:其他好文   时间:2015-08-09 00:17:58    阅读次数:154
POJ 2528 Mayor's posters
DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral poster...
分类:其他好文   时间:2015-08-01 15:34:25    阅读次数:101
UVA 10859 Placing Lampposts(树DP)
题意:给一个n个顶点m条边的无向无环图,在尽量少的结点上放灯,使得所有边都被照亮。每盏灯将照亮以它为一个端点的所有边。在灯的总数最小的前提下,被两盏灯同时照亮的变数应该尽量大。 决策只有两种:在i处放灯和不放灯。后继状态是i的各个子节点。但是,i处是否放灯将影响子节点的决策。因此要把父节点有没有放灯加入状态表示中。...
分类:其他好文   时间:2015-07-26 20:56:54    阅读次数:120
Project Euler:Problem 90 Cube digit pairs
Each of the six faces on a cube has a different digit (0 to 9) written on it; the same is done to a second cube. By placing the two cubes side-by-side in different positions we can form a variety of...
分类:其他好文   时间:2015-07-24 22:42:52    阅读次数:231
[LeetCode][Java] N-Queens
题目: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-...
分类:编程语言   时间:2015-07-15 11:12:55    阅读次数:117
127条   上一页 1 ... 5 6 7 8 9 ... 13 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!