Chef and The Right Triangles
The Chef is given a list of N triangles. Each triangle is identfied by the coordinates of its three corners in the 2-D cartesian plane. His job is to figure out how m...
分类:
其他好文 时间:
2014-05-07 16:28:35
阅读次数:
314
这是在省赛前热身赛出的题目,可能是题目中有用到博弈的思想,很多人都在做,而且在尝试暴力。但是没有人往dp的方向上想。
题意:
有一个长度为n的整数序列,A和B轮流取数,A先取,每次可以从左端或者右端取一个数,所有数都被取完时游戏结束,然后统计每个人取走的所有数字之和作为得分,两人的策略都是使自己的得分尽可能高,并且都足够聪明,求A的得分减去B的得分的结果。...
分类:
其他好文 时间:
2014-05-07 16:09:45
阅读次数:
436
The Morning Commute
The Chef commutes to work every day using the city's underground metro. The schedule for the trains has recently been changed and he wants to know how long it will take to tra...
分类:
其他好文 时间:
2014-05-07 15:37:11
阅读次数:
406
本文出自:http://blog.csdn.net/svitter
原题:http://poj.org/problem?id=1141
题意:输出添加括号最少,并且使其匹配的串。
题解: dp [ i ] [ j ] 表示添加括号的个数, pos[ i][ j ] 表示i, j中哪个位置分开,使得两部分分别匹配。
初始值置dp [ i ] [ i ] = 1; 如果只有一个括号,...
分类:
其他好文 时间:
2014-05-07 15:17:21
阅读次数:
367
Arranging Cup-cakes
Our Chef is catering for a big corporate office party and is busy preparing different mouth watering dishes. The host has insisted that he serves his delicious cupcakes for de...
分类:
其他好文 时间:
2014-05-07 12:34:21
阅读次数:
396
The Little Elephant from the Zoo of Lviv currently is on the military mission. There are N enemy buildings placed in a row and numbered from left to right strating from 0. Each building i (except the ...
分类:
其他好文 时间:
2014-05-07 11:49:37
阅读次数:
390
搜索算法是利用计算机的高性能来有目的的穷举一个问题解空间的部分或所有的可能情况,从而求出问题的解的一种方法。
搜索算法实际上是根据初始条件和扩展规则构造一棵“解答树”并寻找符合目标状态的节点的过程。所有的搜索算法从最终的算法实现上来看,都可以划分成两个部分——控制结构(扩展节
点的方式)和产生系统(扩展节点),而所有的算法优化和改进主要都是通过修改其控制结构来完成的。其实,在这样的思考过程中,我们已经不知不觉地将一个具体的问题抽象成了一个图
论的模型——树,即搜索算法的使用第一步在于搜索树的建立....
分类:
其他好文 时间:
2014-05-07 11:28:27
阅读次数:
319
Chef had an interesting dream last night. He dreamed of a new revolutionary chicken recipe. When he woke up today he tried very hard to reconstruct the ingredient list. But, he could only remember cer...
分类:
其他好文 时间:
2014-05-07 11:23:54
阅读次数:
330
Sharepoint学习笔记—习题系列--70-573习题解析 -(Q147-Q150)
分类:
其他好文 时间:
2014-05-07 03:01:28
阅读次数:
346
仿真软件modelsim中,错误 Error: already declared in this
scope
()在定义这个信号前其它模块接口信号中调用了这个信号,modelsim仿真报错,通过把信号定义挪到调用模块前面问题解决。可能是modelsim有要求,在块里边出现之前,必须先做声明。
分类:
其他好文 时间:
2014-05-06 23:47:22
阅读次数:
482