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
POJ1651Multiplication
Puzzle
(区间DP)
原文链接:http://www.cnblogs.com/gj-Acit/p/3269201.html比较好做的区间DP状态转移方程:DP[i][j]表示区间[i,j]最小的乘积和。DP[i][j]=MIN{DP[i][k-1]+DP[k+1][j]+a[k]*a[i-1]*a[j+1]|i2#include3#include4#include5#include6#include7#include8
weixin_33802505
·
2013-08-19 23:00
HDU 1097 a hard
puzzle
Ahard
puzzle
TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission
u011042188
·
2013-08-19 20:00
Codeforces Round #196 (Div. 2)
A.
Puzzle
stimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTheendoftheschoolyearisnearandMs.Manana
y5885922
·
2013-08-18 21:00
c
算法
ACM
C Programming
Puzzle
rs
Thesequestionsoriginallyappearedasan articleonprogrammersheaven.com,writtenbyAshokK.Pathak,aresearcheratBharatElectronicsLimited(CRL),Ghaziabad. Theyarereproducedherewithminormodifications.Thequestion
fovwin
·
2013-08-18 19:00
C语言面试题
C
puzzle
s
Dearvisitor,ThanksforyourinterestinCprogramming.Inthispage,youwillfindalistofinterestingCprogrammingquestions/
puzzle
s
fovwin
·
2013-08-18 19:00
C语言面试题
[leetcode] Valid Sudoku
DetermineifaSudokuisvalid,accordingto: Sudoku
Puzzle
s-TheRules.TheSudokuboardcouldbepartiallyfilled,whereemptycellsarefilledwiththecharacter
logarrow
·
2013-08-18 17:00
Codeforces Round#196 前三题
A.
Puzzle
stimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTheendoftheschoolyearisnearandMs.Manana
opm777
·
2013-08-17 23:00
codeforces
CF 337A(
Puzzle
s-暴力枚举)
A.
Puzzle
stimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTheendoftheschoolyearisnearandMs.Manana
nike0good
·
2013-08-17 11:00
uva 704 Colour Hash(隐式图搜索+ 模拟)
ColourHash This
puzzle
consistsoftwowheels.Bothwheelscanrotatebothclockandcounter-clockwise.Theycontain21colouredpieces
u011328934
·
2013-08-17 11:00
Puzzle
s
A.
Puzzle
stimelimitpertest1secondmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTheendoftheschoolyearisnearandMs.Manana
u010422038
·
2013-08-17 08:00
Puzzle
s
题意:在m个数里面选n个数,是的这n个数的最大值和最小值的差值尽可能的小。反省:我一开始的想法是,先求出m个数的平均值,将每个数与平均值的差值的绝对值存进数组里,由小到大排序,然后输出第n项和第1项的和。但是wrong在pretest3上面了。test3:Test:#3,time: 0 ms.,memory: 0 KB,exitcode: 0,checkerexitcode: 1,verdict:
Chuck_0430
·
2013-08-17 04:00
CF#196DIV2:A-
Puzzle
s
http://codeforces.com/contest/337/problem/ATheendoftheschoolyearisnearandMs.Manana,theteacher,willsoonhavetosaygoodbyetoayetanotherclass.Shedecidedtoprepareagoodbyepresentforhernstudentsandgiveeachoft
libin56842
·
2013-08-17 02:00
CF
水
UVA 704 Colour Hash (双向bfs + 判重)
ColourHash This
puzzle
consistsoftwowheels.Bothwheelscanrotatebothclockandcounter-clockwise.Theycontain21colouredpieces
u011217342
·
2013-08-14 21:00
【找规律】HDU 4662——MU
Puzzle
来源:点击打开链接 这个题目的来源是人工智能领域MU猜想。比赛的时候也参考了相关资料,可是最后差一点没有把规律推出来。 注意到以下几个性质。第一,MI怎么变换M永远只能在第一位。第二,因为变换时只能在I和U之间变换,因此,除了第一个是M以外,后面如果有字符串不是U、I以内的话永远不可能变换得到。第三,U可以看成是3个I,无论是I先变换成U再操作还是转化成一定数量的I,最后再准换成一定数量的U即
·
2013-08-14 18:00
HDU
【找规律】HDU 4662——MU
Puzzle
来源:点击打开链接这个题目的来源是人工智能领域MU猜想。比赛的时候也参考了相关资料,可是最后差一点没有把规律推出来。注意到以下几个性质。第一,MI怎么变换M永远只能在第一位。第二,因为变换时只能在I和U之间变换,因此,除了第一个是M以外,后面如果有字符串不是U、I以内的话永远不可能变换得到。第三,U可以看成是3个I,无论是I先变换成U再操作还是转化成一定数量的I,最后再准换成一定数量的U即可,因此
mig_davidli
·
2013-08-14 15:00
原创翻译linux性能调优3和4 分析性能瓶颈调优
soattachedand
puzzle
dandwhatuwillknowthatfocusonotherstuffthetuningstuffisreallycomplicatedandIstartwonderingmyway.AmIanidealist
yuangeqingtia
·
2013-08-14 10:15
原创翻译
Linux系统调优
hdu1043Eight (经典的八数码)(康托展开+BFS)
建议先学会用康托展开:http://blog.csdn.net/u010372095/article/details/9904497ProblemDescriptionThe15-
puzzle
hasbeenaroundforover100years
u010372095
·
2013-08-13 21:00
bfs
树状
UVA 10085 The most distant state(八数码问题)
TheMostDistantStateInput: standardinputOutput: standardoutput The8-
puzzle
isasquaretrayinwhicheightsquaretilesareplaced.Theremainingninthsquareisuncovered.Eachtilehasanumberonit.Atilethatisadjacenttoth
u011217342
·
2013-08-12 22:00
uva 10085 The most distant state(八数码)
TheMostDistantStateInput: standardinputOutput: standardoutput The8-
puzzle
isasquaretrayinwhicheightsquaretilesareplaced.Theremainingninthsquareisuncovered.Eachtilehasanumberonit.Atilethatisadjacenttoth
u011328934
·
2013-08-12 21:00
hdu 4578 Transformation(线段树维护区间次方和)
/65536K(Java/Others)TotalSubmission(s):1378 AcceptedSubmission(s):303ProblemDescriptionYuanfangis
puzzle
dwiththequestionbelow
y5885922
·
2013-08-12 20:00
c
算法
ACM
hdu 4490
/Others)TotalSubmission(s):267AcceptedSubmission(s):109SpecialJudgeProblemDescriptionMadVeterinarian
puzzle
shaveamadveterin
u010422038
·
2013-08-12 19:00
HDOJ 4578 && 2013杭州邀请赛
/65536K(Java/Others)TotalSubmission(s):1169 AcceptedSubmission(s):249ProblemDescriptionYuanfangis
puzzle
dwiththequestionbelow
zkzxmzk
·
2013-08-12 14:00
线段树
ACM
UVA 387 A Puzzling Problem(dfs + 模拟)
APuzzlingProblem Thegoalofthisproblemistowriteaprogramwhichwilltakefrom1to5
puzzle
piecessuchasthoseshownbelowandarrangethem
u011217342
·
2013-08-10 20:00
UVA 519
Puzzle
(II) (dfs + 剪枝)
Puzzle
(II) LittleBarborkahasjuststartedtolearnhowtosolveapicture
puzzle
.Shehasstartedwithasmallonecontaining15pieces.Herdaddytriestosolvethe
puzzle
too.Tomakeitalittlebitharderforhimself
u011217342
·
2013-08-10 20:00
UVA 421 Polygonal
Puzzle
呵呵一早起来改半天还是WA //大白p263 #include #include #include #include #include #include #include #include #include #include usingnamespacestd; constdoubleeps=1e-8;//精度 constintINF=0x3f3f3f3f; constdoublePI=acos
lfj200411
·
2013-08-10 19:00
hdu 4578 Transformation2013杭州邀请赛C(简单线段树)
65536K(Java/Others)TotalSubmission(s):0 AcceptedSubmission(s):0ProblemDescription Yuanfangis
puzzle
dwiththequestionbelow
ophunter
·
2013-08-10 15:00
数据结构
poj 3678 Katu
Puzzle
2-SAT
Katu
Puzzle
TimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 6702 Accepted: 2463DescriptionKatu
Puzzle
ispresentedasadirectedgraph
cyendra
·
2013-08-09 19:00
HDU 4662 MU
Puzzle
(水题)
题意:给定字符串,下面定义几个操作:1)将Mx变成Mxx,例如MII可以变为MIIII2)将III替换成U3)去掉连续两个U,例如MIUU可以变成MI现在问你能不能将MI转换成给定字符串。思路:注意到以下几个性质。第一,MI怎么变换M永远只能在第一位。第二,因为变换时只能在I和U之间变换,因此,除了第一个是M以外,后面如果有字符串不是U、I以内的话永远不可能变换得到。第三,U可以看成是3个I,无论
blzorro
·
2013-08-09 12:00
字符串
数论
HDU 4662 MU
Puzzle
比赛题目题意:一个字符串“MI”,每次可以将M后面的所有字符串翻倍,或者将连续的3个I变成一个U,或者消掉2个连续的U,问能否变到目标串。题解:可以把U换算成3个I,那么目标串中I的个数有cnt个。而任何地方原来可能有两个U,也就是6个I,设消掉了6x个,那么昨晚翻倍操作后有cnt+6x个I。由于翻倍是每次乘2,所以求是否有x使得6x+cnt为2的幂。将cnt%6,则cnt-cnt%6可以归入x部
u010638776
·
2013-08-09 12:00
HDU 4662 MU
Puzzle
多校最水的一题
若变成了奇数就-3,再变成偶数就除二,直到小于2为止若最终的结果是1就是Yes,否则就是No,要注意的是原串中有且仅有第一个字符是M代码如下:/********* PRO:hdu4662 TIT:MU
Puzzle
u011401504
·
2013-08-09 10:00
HDU
puzzle
MU
4662
2013多校联合训练
8#9 - 多校6
04IntegerPartition-数学(整数拆分,五边形数)07MessagePassing08MU
Puzzle
10Triangulation(经典博弈,构造SG函数,打表找规律,确定循环节以后异
XDU_Truth
·
2013-08-09 01:00
hdu1104Remainder (BFS)
ProblemDescriptionCocoisacleverboy,whoisgoodatmathematics.However,heis
puzzle
dbyadifficultmathematicsproblem.Theproblemis
u010372095
·
2013-08-08 20:00
bfs
uva 387 A Puzzling Problem (回溯)
APuzzlingProblem Thegoalofthisproblemistowriteaprogramwhichwilltakefrom1to5
puzzle
piecessuchasthoseshownbelowandarrangethem
u011328934
·
2013-08-08 09:00
ZOJ3435 Ideal
Puzzle
Bobble
mobius反演的入门题。首先,先抄一遍mobius反演:已知f(n)=sigma(d|n,g(d))那么g(n)=sigma(d|n,mu(d)*f(n/d))mobius反演的另一种形式:在某一范围内,已知f(n)=sigma(n|d,g(d))那么g(n)=sigma(n|d,mu(d/n)*f(d))本题的难度其实就入门来说比较大,推荐先做一下POJ3090,HDU1695,SPOJVLA
huangshenno1
·
2013-08-04 23:00
poj 3131 Cubic Eight-
Puzzle
双向广搜 Hash判重
挺不错的题目,很锻炼代码能力和调试能力~题意:初始格子状态固定,给你移动后格子的状态,问最少需要多少步能到达,如果步数大于30,输出-1。由于单向搜索状态太多,搜到二十几就会爆了,所以应该想到双向广搜。对于每一个格子,我只需要记录上面和前面的格子颜色,因为格子左右移动前面颜色不变上面颜色变了,前后移动的话只是前面和上面的颜色交换了而已,不过写的太挫了。。。应该直接进制压缩一下。。。我还用了两个数来
u010710717
·
2013-08-04 22:00
UVA 10557 XYZZY
firstdesignedbyWillCrowtheronthePDP-10inthemid-1970sasanattemptatcomputer-refereedfantasygaming,andexpandedintoa
puzzle
-oriented
·
2013-08-03 22:00
uva
POJ 3678 - Katu
Puzzle
比较典型的构图2-sat...求是否有可行解
题意: 有N个Xi...又告诉M个位运算(ANDORXOR )结果..问是否有存在可行解 题解 每个Xi就两种情况..并且必须选择一个..符合2-sat的模型..那剩下就是根据运算式构造边了...这里要进一步理解2-sat中一条有向边的涵义是选了起点就必须选终点..那剩下的就好办了一个一个分析... x,y代表当前的式子未知数..x
kk303
·
2013-08-03 19:00
uva 10557 XYZZY(DFS+BFS)
firstdesignedbyWillCrowtheronthePDP-10inthemid-1970sasanattemptatcomputer-refereedfantasygaming,andexpandedintoa
puzzle
-orientedgamebyDonWo
u011328934
·
2013-08-01 20:00
uva 10129 Play on Words(欧拉道路)
PlayonWordsSomeofthesecretdoorscontaina veryinterestingword
puzzle
.Theteamofarchaeologistshastosolveittoopenthatdoors.Becausethereisnootherwaytoopenthedoors
u011328934
·
2013-08-01 00:00
POJ 1651 / ZOJ 1602 / Northeastern Europe 2001 Multiplication
Puzzle
(dp)
Multiplication
Puzzle
http://poj.org/problem?id=1651http://acm.zju.edu.cn/onlinejudge/showProblem.do?
synapse7
·
2013-07-31 14:00
dp
动态规划
ACM
uva 156 Ananagrams(检索+sort排序)
Mostcrossword
puzzle
fansareusedto anagrams--groupsofwordswiththesamelettersindifferentorders--forexampleOPTS
u011328934
·
2013-07-28 15:00
hdu 2514 Another Eight
Puzzle
(DFS+回溯)
FillingGwith1andDwith2(orGwith2andDwith1)isillegalsinceGandDareconnectedand1and2areconsecutive.However,fillingAwith8andBwith1islegalsince8and1arenotconsecutive.Inthisproblems,somecirclesarealreadyfill
u011328934
·
2013-07-25 09:00
poj3678 Katu
Puzzle
(2-SAT+经典建图)
Katu
Puzzle
TimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 6669 Accepted: 2444DescriptionKatu
Puzzle
ispresentedasadirectedgraph
ophunter
·
2013-07-23 15:00
图论
poj1204(AC自动机)
TimeLimit:5000MS MemoryLimit:65536KTotalSubmissions:8153 Accepted:3086 SpecialJudgeDescriptionWord
puzzle
sareusuallysimpleandveryentertainingforallages.TheyaresoentertainingthatPizza-Hutcompanystartedu
xj2419174554
·
2013-07-22 21:00
数据结构
字典树
自动机
带前链的字典树
hdu1097
ProblemDescriptionlcygivesahard
puzzle
tofeng5166,lwg,JGShiningandIgnatius:gaveaandb,howtoknowthea^b.everybodyobjectstothisBTproblem
u011459262
·
2013-07-20 11:00
hdu 搜索专题
RedandBlack CountingSheep KnightMoves OilDeposits2:Square SumItUp CatchThatCow RobotMotion AnotherEight
Puzzle
shan614667793
·
2013-07-20 09:00
Debugging--the practice of programming
Withtherightattitudedebuggingcanbefun,likesolvinga
puzzle
,butwhetherweenjoyitornot,debuggingisanartthatwewillpracticeregularly.Still
董桉远
·
2013-07-19 16:00
读书笔记
hdu1043Eight(dbfs)
Java/Others)TotalSubmission(s):9152 AcceptedSubmission(s):2466SpecialJudgeProblemDescriptionThe15-
puzzle
hasbeenaroundforover100y
ophunter
·
2013-07-19 11:00
bfs
hdu2514 Another Eight
Puzzle
(全排列、暴力)
http://acm.hdu.edu.cn/showproblem.php?pid=2514n=8,我直接用了next_permutation全排列,然后对每一个排列进行即可。#include #include #include usingnamespacestd; inta[10]; intb[10]; intans[10]; intpos[10]; boolused[10]; intn,fl
yew1eb
·
2013-07-19 08:00
Codeforces Round #172 (280A) - Rectangle
Puzzle
保持w小h大...保持a #include #include #include #include #include #include #defineoo1000000007 #definelllonglong #definepiacos(-1.0) usingnamespacestd; doublew,h,a,t,x,y,z,ans; intmain() { while(~scanf("%l
kk303
·
2013-07-18 19:00
上一页
48
49
50
51
52
53
54
55
下一页
按字母分类:
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
其他