题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1561题目大意:ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这...
分类:
其他好文 时间:
2014-11-03 00:00:13
阅读次数:
393
介绍: 这篇文章讨论的是你可以(也应该)学习通过使用requestAnimationFrame API,而不是使用之前的setInterval/setTimeout方法,来提高动画的性能;如何使用requestAnimationFrame。当然,我们将会为你展示完善的代码example of re....
分类:
其他好文 时间:
2014-10-31 19:04:06
阅读次数:
193
1、代码如下package better.amy.sort;/** * 堆排序实现 * * @author zhujinrong * */public class HeapSort { /** * 构造大堆 大根堆排序的结果是升序 * * @param a ...
分类:
编程语言 时间:
2014-10-29 14:22:33
阅读次数:
206
前言
昨晚想在Android应用中增加一个整形到字符串的字典表,使用HashMap实现的时候,Eclipse给出了一个警告,昨晚项目上线紧张,我直接给忽略了,今天看了一下具体的Eclipse提示如下:
Use new SparseArray (...) instead for better performance这个警告的意思是使用SparseArray来替代,以获取更好的性能。...
分类:
移动开发 时间:
2014-10-29 13:03:28
阅读次数:
350
传送RunningTime Limit:1000MSMemory Limit:65536KDescriptionThe cows are trying to become better athletes, so Bessie is running on a track for exactlyN(1 ...
分类:
其他好文 时间:
2014-10-28 11:34:59
阅读次数:
163
数据仓库建模 — 星型模式Example of Star Schema数据仓库建模 — 雪片模式Example of Snowflake Schema节省存储空间一定程度上的范式星形 vs.雪花型Which one is better?长期以来的争论两种观点各有支持者争论在继续……目前看来,大部分更...
分类:
其他好文 时间:
2014-10-26 21:07:21
阅读次数:
263
【题目】
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like
this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
...
分类:
其他好文 时间:
2014-10-26 16:57:47
阅读次数:
182
To be an better Gopher, get your hands dirty. Topcoder offered a serials of challenges for learning Golang. In this blog, I tried to implement "Go Lea...
当进入的目录比较深时, cmd的提示符几乎会占据整行, 很烦, 于是Google之... 参考: A better PROMPT for CMD.EXE ... 更改方式: 1. prompt 新提示符 2. set prompt 新提示符 我还是比较喜欢Linux的简洁方式: prompt $$....
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A P L S I I ...
分类:
其他好文 时间:
2014-10-23 22:50:37
阅读次数:
150