码迷,mamicode.com
首页 >  
搜索关键字:uva 刘汝佳 算法入门    ( 8426个结果
UVa 908 - Re-connecting Computer Sites
题目:有一些电脑,电脑间由一些...
分类:其他好文   时间:2014-06-19 12:52:23    阅读次数:249
Uva 514 Rails
There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to e...
分类:其他好文   时间:2014-06-16 11:17:45    阅读次数:162
UVA 11235 RMQ算法
上次的湘潭赛的C题,用线段树敲了下还是WA,不知道为何,我已经注意了处理相同数据,然后他们当时用的RMQ。所以学了下RMQ,感觉算法思想是一样的,RMQ用了DP或者是递推,由单个数到2^k往上推,虽然有部分重叠的,也没关系,因为RMQ是求区间最值嘛然后这道题目,要把出现次数化为最值,构造一个新的数组...
分类:其他好文   时间:2014-06-16 06:21:13    阅读次数:248
UVa 644 - Immediate Decodability
题目:给你一些01串,判断是不是某些串是其它串的前缀。 分析:字符串,字典树。             首先,将字符串按长度排序,这样前缀一定在前面;             然后,再插入字典树的过程中,判断是否覆盖即可。 说明:注意数组的大小。 #include #include #include #include using namespace std; char wor...
分类:其他好文   时间:2014-06-15 20:09:54    阅读次数:190
UVa 457 - Linear Cellular Automata
题目:有40个培养皿,每个培养皿中有一个数字(0-9)。最开始时20号中数字为1,其余为0。             每组输入有一个DNA programs(10个数字构成的序列),它决定每个培养皿下个时间的数字。             设培养皿i中的数字为F(i),则下次其中的数字为DNA(F(i-1)+F(i)+F(i+1))             {即,编号为F(i-1)+F(i)...
分类:其他好文   时间:2014-06-15 19:21:09    阅读次数:249
UVa 10115 - Automatic Editing
题目:给你一些字符串的替换关系,以及一个句子。按顺序替换,输出最后结果。 分析:字符串。按照替换顺序依次替换(这个替换用过之后,就不再使用),每个替换可能出现多次。             这里注意,如果当前串中有多个可被当前单词替换的位置,只替换最前面的那个,             下次用本次生成的串替换,而不是整体一次性替换。 说明:注意数据清空。 #include #inclu...
分类:其他好文   时间:2014-06-15 18:59:34    阅读次数:205
UVa 537 - Artificial Intelligence?
题目:再一句话里面有P,I,U中的2个已知量,求第三个未知量。(P=I*U) 分析:字符串。利用'='定位已知量,然后将'='后面的的数字和单位分别读入处理。 说明:注意单位有m(10^-3),k(10^3),M(10^6)的前缀,以及小数点的处理。 #include #include #include #include using namespace std; char Sat...
分类:其他好文   时间:2014-06-15 17:48:02    阅读次数:199
UVA 297 Quadtrees(四叉树建树、合并与遍历)
K -QuadtreesTime Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusAppoint description:DescriptionQuadtreesA quadtree is a represent....
分类:其他好文   时间:2014-06-12 23:57:11    阅读次数:509
UVA 10085(bfs+康拓展开)八数码问题
Description Problem A The Most Distant State Input: standard input Output: standard output   The 8-puzzle is a square tray in which eight square tiles are placed. The remaining ninth square ...
分类:其他好文   时间:2014-06-10 07:59:06    阅读次数:335
Uva 11489 - Integer Game
Two players, S and T, are playing a game where they make alternate moves. S plays first.  In this game, they start with an integer N. In each move, a player removes one digit from the integer and p...
分类:其他好文   时间:2014-06-10 06:31:29    阅读次数:302
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!