E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
PUZZLE
POJ1651:Multiplication
Puzzle
(区间DP 最优矩阵链乘)
题意:除了头尾不能动,每次取出一个数字,这个数字与左右相邻数字的乘积为其价值,最后将所有价值加起来,要求最小值和最优矩阵链乘模型一样,最后取出的数决定了序,如果没学过最优矩阵连乘找重复子问题还是比较难找的DP//180K0MS #include #include #include #include usingnamespacestd; intdp[110][110]; intn; intnum[1
kalilili
·
2015-03-09 20:00
LeetCode 51.N-Queens
题目:Then-queens
puzzle
istheproblemofplacingnqueensonann×nchessboardsuchthatnotwoqueensattackeachother.Givenanintegern
caishenfans
·
2015-03-08 20:00
backtracking
LeetCode --- 51. N-Queens
题目链接:N-QueensThen-queens
puzzle
istheproblemofplacingnqueensonann×nchessboardsuchthatnotwoqueensattackeachother.Givenanintegern
makuiyu
·
2015-03-07 10:00
LeetCode
C++
回溯
LeetCode-Sudoku Solver
WriteaprogramtosolveaSudoku
puzzle
byfillingtheemptycells.Emptycellsareindicatedbythecharacter '.'.Youmayassumethattherewillbeonlyoneuniquesolution.Asudoku
puzzle
WuXueyang
·
2015-03-06 18:00
LeetCode
table
hash
backtracking
OJ
LeetCode(51) N-Queens
题目如下:Then-queens
puzzle
istheproblemofplacingnqueensonann×nchessboardsuchthatnotwoqueensattackeachother.Givenanintegern
feliciafay
·
2015-03-04 14:00
LeetCode(50) N-Queens II
题目如下:Then-queens
puzzle
istheproblemofplacingnqueensonann×nchessboardsuchthatnotwoqueensattackeachother.Givenanintegern
feliciafay
·
2015-03-04 12:00
DFS
backtracking
poj 1204 Word
Puzzle
s (ac自动机)
题意:给出一个字符串矩阵,n个单词,要求n个单词去匹配这个矩阵,单词可以出现矩阵任意位置,可以斜着,横着,竖着。求出每个单词的首字母在矩阵中的位置,以及方向。题解:枚举起点,和方向,在矩阵中暴力匹配。#include #include #include #include #include #include #include #include #include usingnamespacestd;
My_ACM_Dream
·
2015-03-02 13:00
UVa 227 -
Puzzle
题目:给你一个字母组成的矩阵,其中有一个空位,给你移动的规则(类似平面的一种拼图游戏); 问是否操作合法,合法时输出移动后的结果。说明:模拟。直接利用二位数组模拟即可。分析:年后的第一题(⊙v⊙)。#include #include #include #include #include #include usingnamespacestd; charmaps[5][7]; charc
mobius_strip
·
2015-02-23 14:00
LeetCode 37.Sudoku Solver
题目:WriteaprogramtosolveaSudoku
puzzle
byfillingtheemptycells.Emptycellsareindicatedbythecharacter '.'.Youmayassumethattherewillbeonlyoneuniquesolution.Asudoku
puzzle
caishenfans
·
2015-02-22 12:00
table
hash
backtracking
51. N-Queens Leetcode Python
The n-queens
puzzle
istheproblemofplacing n queensonan n×n chessboardsuchthatnotwoqueensattackeachother.Givenaninteger
hyperbolechi
·
2015-02-20 06:00
LeetCode
python
DFS
LeetCode 36.Valid Sudoku
题目:DetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled
caishenfans
·
2015-02-18 00:00
table
hash
UVA 519
Puzzle
(II)
LittleBarborkahasjuststartedtolearnhowtosolveapicture
puzzle
.Shehasstartedwithasmallonecontaining15pieces.Herdaddytriestosolvethe
puzzle
too.Tomakeitalittlebitharderforhimself
jtjy568805874
·
2015-02-17 14:00
uva
剪枝
暴力
noip2011 day1-3 Mayan游戏
Mayan
puzzle
是最近流行起来的一个游戏。游戏界面是一个7行5列的棋盘,上面堆放着一些方块,方块不能悬空堆放,即方块必须放在最下面一行,或者放在其他方块之上。
Donald_TY
·
2015-02-16 10:00
搜索
pascal
DFS
noip
提高组
LeetCode 37 - Sudoku Solver
WriteaprogramtosolveaSudoku
puzzle
byfillingtheemptycells.Emptycellsareindicatedbythecharacter '.'.Youmayassumethattherewillbeonlyoneuniquesolution.Asudoku
puzzle
yuanhsh
·
2015-02-16 00:00
LeetCode
LeetCode 37 - Sudoku Solver
WriteaprogramtosolveaSudoku
puzzle
byfillingtheemptycells.Emptycellsareindicatedbythecharacter '.'.Youmayassumethattherewillbeonlyoneuniquesolution.Asudoku
puzzle
yuanhsh
·
2015-02-16 00:00
LeetCode 36 - Valid Sudoku
DetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled,whereemptycellsarefilledwiththecharacter
yuanhsh
·
2015-02-16 00:00
UVALive 3907 (LA 3907)
Puzzle
AC自动机 + 搜索DP 记录路径
题目大意:给定s个字符串(1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; cons
u013738743
·
2015-02-15 15:00
dp
uvalive
AC自动机
puzzle
la
3907
3907
hdu 1034 & poj 1077 Eight 传说中的八数码问题。真是一道神题,A*算法+康托展开
Java/Others)TotalSubmission(s):13506 AcceptedSubmission(s):3855SpecialJudgeProblemDescriptionThe15-
puzzle
hasbeenaroundforover100
Lionel_D
·
2015-02-15 00:00
ACM
八数码问题
Eight
A算法
hdu1043
【LeetCode从零单排】No36 Valid Sudoku
DetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled,whereemptycellsarefilledwiththecharacter
gshengod
·
2015-02-13 16:00
java
LeetCode
LeetCode36——Valid Sudoku
DetermineifaSudokuisvalid,accordingto:Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled,whereemptycellsarefilledwiththecharacter
booirror
·
2015-02-11 15:00
LeetCode
使用Code Digger进行代码覆盖率测试
使用了Pex引擎,它有一个网页版点这里比如有一段判断闰年的代码,Pex会把if…else这些分支全部测到usingSystem; publicclassProgram{ publicstaticvoid
Puzzle
lee576
·
2015-02-09 10:00
POJ1651 Multiplication
Puzzle
ACM解题报告(区间dp)
这题就是个简单的区间DP,方法是很简单,重点是这种思想,不确定最优解是i-j中的哪一个,就要遍历一下然后取最优解状态转移方程d(i,j)=min(d(i,k)+dp(k,j)+a[i]*a[k]*a[j])注意a[k]是最后取走的一个数字。类似区间dp的还有矩阵链乘。我再去找个练练。#include #include #include #include #include #include #inc
Miracle_ma
·
2015-02-06 20:00
动态规划
ACM
poj
LeetCode --- 36. Valid Sudoku
题目链接:ValidSudokuDetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled
makuiyu
·
2015-02-05 23:00
LeetCode
C++
hash表
LeetCode --- 37. Sudoku Solver
题目链接:SudokuSolverWriteaprogramtosolveaSudoku
puzzle
byfillingtheemptycells.Emptycellsareindicatedbythecharacter
makuiyu
·
2015-02-05 23:00
LeetCode
C++
hash表
回溯
【LeetCode】Sudoku Solver
SudokuSolver TotalAccepted:20609TotalSubmissions:96910MySubmissionsQuestionSolution WriteaprogramtosolveaSudoku
puzzle
byfillingtheemptycells.Emptycellsareindicatedbythecharacter
u013027996
·
2015-02-04 22:00
Valid Sudoku
ValidSudokuDetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled
luxialan
·
2015-02-04 22:00
LeetCode-Valid Sudoku
DetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled,whereemptycellsarefilledwiththecharacter
My_Jobs
·
2015-02-04 18:00
【LeetCode】Valid Sudoku
25228TotalSubmissions:92921MySubmissionsQuestionSolution DetermineifaSudokuisvalid,accordingto:Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled
u013027996
·
2015-02-04 18:00
UVA - 12301 - An Angular
Puzzle
(计算几何~平面三角)
题目地址:点这里思路:可以先确定A,B的坐标,然后再通过确定向量来硬算出角度。。好像可以推公式做,没推出来╮(╯_╰)╭AC代码:#include #include #include #include #include usingnamespacestd; constdoublePI=4*atan(1.0); structPoint{ doublex,y; Point(doublex=0,do
u014355480
·
2015-02-03 22:00
ACM
uva
计算几何
CodeForces 510 B. Fox And Two Dots(DFS 啊)
题目链接:http://codeforces.com/problemset/problem/510/BFoxCielisplayingamobile
puzzle
gamecalled"TwoDots".Thebasiclevelsareplayedonaboardofsize
u012860063
·
2015-02-03 21:00
DFS
codeforces
纵横字谜的答案(Crossword Answers)
CrosswordAnswersTimelimit:3.000seconds CrosswordAnswers Acrossword
puzzle
consistsofarectangulargridofblackandwhitesquaresandtwolistsofdefinitions
qq_15096707
·
2015-02-02 19:00
java
uva
answers
Crossword
纵横字谜的答案
纵横字谜的答案(Crossword Answers)
CrosswordAnswersTimelimit:3.000secondsCrosswordAnswersAcrossword
puzzle
consistsofarectangulargridofblackandwhitesquaresandtwolistsofdefinitions
梦小白
·
2015-02-02 19:00
java
UVa
纵横字谜的答案
Crossword
Answers
数组和字符串处理
谜题(
Puzzle
)
Puzzle
Timelimit:3.000seconds
Puzzle
Achildren's
puzzle
thatwaspopular30yearsagoconsistedofa5x5framewhichcontained24smallsquaresofequalsize.Auniqueletterofthealphabetwasprintedoneachsmallsquare.Sincether
qq_15096707
·
2015-02-02 13:00
java
uva
puzzle
谜题
UVa 227 -
Puzzle
怎么说呢,昨晚睡觉前看了这道题,思路很快就想了出来,然后就睡觉了,想第二天早上起来之后再把它写出来,第二天醒来后没花很长时间代码就写好了,刚开始因为忽略了输入单个字符时缓冲区的换行符问题,导致了错误,调试了很久才发现,归根到底还是对getchar();吃换行符理解的不够深入,改过来之后UVa上的测试用例过了,然后提交,结果WA了,后来一直在看程序,也没发现哪里有错,调试了一下午,提交还是不对,最后
ft_sunshine
·
2015-02-01 21:00
The Tower of Hanoi
TheTowerofHanoi IntheTowerofHanoi
puzzle
:Therearethreestacks(towers),numbered 0,1,2.
yuanhsh
·
2015-02-01 10:00
POJ 3678 Katu
Puzzle
(2-sat 模板题)
id=3678DescriptionKatu
Puzzle
ispresentedasadirectedgraph G(V, E)witheachedge e(a, b)labeledbyabooleanoperator
u012860063
·
2015-01-31 21:00
poj
图论
2-sat
leetcode 36: Valid Sudoku
TotalAccepted:24574TotalSubmissions:90344DetermineifaSudokuisvalid,accordingto:Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled
xudli
·
2015-01-29 12:00
Uva-227 -
Puzzle
-AC
解体思路:二维数组储存原型,记录空格位置,按顺序移动,移动越界即为This
puzzle
hasnofinalconfiguration.注意:1、这个题输出格式卡的我老是WA,注意具体那个空行的位置TRGSJXDOKIMVLNWPABEUQHCFARRBBL0
Puzzle
lell3538
·
2015-01-27 18:00
uva_232_ Crossword Answers
Discription Acrossword
puzzle
consistsofarectangulargridofblackandwhitesquaresandtwolistsofdefinitions
a7055117a
·
2015-01-27 18:00
C语言
3-6 uva 232 Crossword Answers
题目:Acrossword
puzzle
consistsofarectangulargridofblackandwhitesquaresandtwolistsofdefinitions(ordescriptions
liujc_
·
2015-01-23 17:00
uva227 谜题
Puzzle
Achildren's
puzzle
thatwaspopular30yearsagoconsistedofa5x5framewhichcontained24smallsquaresofequalsize.Auniqueletterofthealphabetwasprintedoneachsmallsquare.Sincetherewereonly24squareswithinthef
wust_ZJX
·
2015-01-17 16:00
Valid Sudoku Leetcode Python
DetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled,whereemptycellsarefilledwiththecharacter
hyperbolechi
·
2015-01-17 05:00
LeetCode
python
bfs
LeetCode:Valid Sudoku,Sudoku Solver(数独游戏)
ValidSudokuDetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled
lcj_cjfykx
·
2015-01-13 11:00
SDUT14级队员训练1 E -
Puzzle
题目链接:E-
Puzzle
题目大意:模仿拼图(不是你想的那个拼图是上下左右推的那个拼图……) 空格表示可移向的位置 后面是一串移动方案以数字0结束A—向上B—向下R—向右L—向左(这里均为空位的移动)
ChallengerRumble
·
2015-01-09 22:00
编程
C++
ACM
解题报告
uva
Lettcode_36_Valid Sudoku
http://blog.csdn.net/pistolove/article/details/42528601DetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled
pistolove
·
2015-01-08 19:00
java
LeetCode
二维数组
算法
数独
源于一个文字游戏的题目
独立博客地址:http://cxh.me/2015/01/05/a-word-
puzzle
/起源是这样一道题目:于是想到通过worddict来算一下:先去下载了中文词库:
[email protected]
forever_wind
·
2015-01-05 23:00
游戏
word
awk
正则
Scala程序集 牛顿法计算平方根
牛顿法是一个迭代算法,原理用一句话就可以概括:如果a*b=n,那么n的平方根一定在a与b之间换句话说(a+b)/2,一定比a更精确package
puzzle
s.sqrt /** * Created
dingbo8128
·
2015-01-01 15:24
scala
Scala程序集 N皇后问题
八皇后问题共有92个解,上图便是其中3个解解这个问题的Scala程序package
puzzle
s /** * Created by Bo on 2015/1/1. */
dingbo8128
·
2015-01-01 13:02
scala
N皇后
poj1200 哈希
id=1200DescriptionManypeopleliketosolvehard
puzzle
ssomeofwhichmayleadthemtomadness.Onesuch
puzzle
couldbefindingahiddenprimenumberinagiventext.Suchnumbercouldbethenumberofdifferent
u013573047
·
2014-12-29 10:00
[LeetCode] Sudoku Solver
WriteaprogramtosolveaSudoku
puzzle
byfillingtheemptycells. Emptycellsareindicatedbythecharacter'.'.
jiyanfeng1
·
2014-12-25 22:00
LeetCode
上一页
41
42
43
44
45
46
47
48
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他