摘要: 题目:Problem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or gr... 阅读全文
posted @ 2014-05-30 16:33 小叶叶 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 一道记忆搜索题,记忆搜索题就是搜索的形式+DP的思想!题目:FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid locatio... 阅读全文
posted @ 2014-05-29 17:12 小叶叶 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 七种qsort排序方法一、对int类型数组排序intnum[100];Sample:intcmp(constvoid*a,constvoid*b){return*(int*)a-*(int*)b;}qsort(num,100,sizeof(num[0]),cmp);二、对char类型数组排序(同in... 阅读全文
posted @ 2014-05-27 13:44 小叶叶 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目:The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms e... 阅读全文
posted @ 2014-05-27 12:38 小叶叶 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 二维的数组,比如i,j相加是偶数,目标相加是偶数,则只能经过偶数步,如果所给是奇数步,自然就无需再算,肯定不成功。 阅读全文
posted @ 2014-05-22 12:37 小叶叶 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目:The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie coul... 阅读全文
posted @ 2014-05-22 12:33 小叶叶 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1 for(j = 1; j 0){6 value[cout ++] = num * value1[i];7 }View Code如num = 4, 将其优化成1 2,这样4以内的数都可以用1 2组合表示。 阅读全文
posted @ 2014-05-20 17:32 小叶叶 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 题目:We all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang Zho... 阅读全文
posted @ 2014-05-20 14:37 小叶叶 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 题目:不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:"我要买道具!"地精商人:"我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水350块一个."死亡骑士:"好的,给... 阅读全文
posted @ 2014-05-20 10:04 小叶叶 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 题目:Problem DescriptionNowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College ha... 阅读全文
posted @ 2014-05-19 12:53 小叶叶 阅读(163) 评论(0) 推荐(0) 编辑