码迷,mamicode.com
首页 >  
搜索关键字:katu puzzle    ( 693个结果
zoj 2954 Hanoi Tower
Hanoi TowerTime Limit: 2 Seconds Memory Limit: 65536 KBYou all must know the puzzle named "The Towers of Hanoi". The puzzle has three pegs (peg 1, peg...
分类:其他好文   时间:2016-01-21 19:13:06    阅读次数:165
N-Queens
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:其他好文   时间:2016-01-05 00:06:12    阅读次数:193
hdu 1097 A hard puzzle
Problem Descriptionlcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT probl...
分类:其他好文   时间:2015-12-30 21:43:00    阅读次数:145
[LeetCode]题解(python):051-N-Queens
题目来源https://leetcode.com/problems/n-queens/Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each ...
分类:编程语言   时间:2015-12-28 14:15:49    阅读次数:180
计算机学院大学生程序设计竞赛(2015’12) 1003 The collector’s puzzle
#include#includeusing namespace std;using namespace std;const int maxn=100000+10;int a[maxn],b[maxn];int main(){ int n,m; while(scanf("%d %d",&n...
分类:其他好文   时间:2015-12-27 19:10:10    阅读次数:225
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
HDU计算机学院大学生程序设计竞赛(2015’12)1003 The collector’s puzzle
题意:有N个珠宝 M个箱子 珠宝价值a 箱子价值b每个珠宝放在箱子里,花费abs(a-b)箱子可以无限放珠宝求最小花费水题预处理每个价值的珠宝所放的箱子O(n)从左往右找到最接近的左箱子l 从右往左找到最接近的右箱子r取min#include#include#include#include#incl...
分类:其他好文   时间:2015-12-26 18:25:19    阅读次数:181
poj 1651 Multiplication Puzzle 区间dp
题目链接给一串数, 拿出一个数i的代价是a[i-1]*a[i]*a[i+1], 第一个数和最后一个数不能拿, 求拿走剩下的数的代价的最小值。#include #include #include #include #include #include #include #include #include...
分类:其他好文   时间:2015-12-24 10:41:05    阅读次数:110
LeetCode - Sudoku Solver
题目:Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will b...
分类:其他好文   时间:2015-12-23 16:14:23    阅读次数:135
POJ1651 Multiplication Puzzle 区间dp
题意:给一个序列,每次选一个数(记为b),计算左边离他最近的数(记为a),右边离他最近的数(记为c),计算a*b*c,sum+=a*b*c 重复操作直到剩下开头结尾两个数不同的方案对应不同的sum 计算最小的sum值分析:典型的区间dp,dp[i][j]表示把从i到j所有的数都选走得到的最小值dp[...
分类:其他好文   时间:2015-12-21 23:40:10    阅读次数:162
693条   上一页 1 ... 30 31 32 33 34 ... 70 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!