![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM C语言
Toi
这个作者很懒,什么都没留下…
展开
-
关于有传送门的BFS
关于有传送门的BFS上次中南中期比赛的题目有个有传送门的BFS题目,这题目之前出现过一次,不过没中南的这个难,题意是在一个矩阵中从S到E,之间1的地方不能走,0的地方能走一步,消耗时间为1,2-9的地方除了能像0一样走,还能传送到相同数字的位置。之前做的那个是p能传送,这题只是传送门种类多了一些,但是解题方法是一样的。题目链接http://acm.csu.edu.cn/Online转载 2012-08-10 10:59:47 · 1636 阅读 · 0 评论 -
最全的c++ map的用法
最全的c++ map的用法 1. map最基本的构造函数; mapmapstring; mapmapint; mapmapstring; mapmapchar; mapmapchar; mapmapint; 2. map添加数据; map maplive; 1.转载 2012-08-18 13:13:04 · 624 阅读 · 0 评论 -
qsort七种排序方法
七种qsort排序方法 qsort 包含在头文件 #includeqsort ( 哪个 , 长度 , 大小, cmp)一、对int类型数组排序 int num[100]; int cmp ( const void *a , const void *b ) { return *(int *)a - *(int *)b; }转载 2012-08-16 12:41:02 · 4213 阅读 · 0 评论 -
BFS广搜——hdu 4255 A Famous Grid
点击打开链接 A Famous GridTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 582 Accepted Submission原创 2012-08-13 20:41:37 · 1484 阅读 · 1 评论 -
(hdu 4245 & hdu 4256) A Famous Music Composer 、The Famous Clock ( C++ map)
http://acm.hdu.edu.cn/showproblem.php?pid=4245点击打开链接http://acm.hdu.edu.cn/showproblem.php?pid=4256点击打开链接 A Famous Music ComposerProblem DescriptionMr. B is a famous music com原创 2012-08-13 21:20:27 · 920 阅读 · 0 评论 -
DP动态规划——hdu 2084 数塔
http://acm.hdu.edu.cn/showproblem.php?pid=2084 数塔Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11180原创 2012-08-09 15:11:48 · 664 阅读 · 0 评论 -
DP动态规划——(hdu 1081)To the Max
http://acm.hdu.edu.cn/showproblem.php?pid=1081 To The MaxTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s):原创 2012-08-11 13:51:23 · 570 阅读 · 0 评论 -
DP动态规划——Litter Shop of Flowers
LITTLE SHOP OF FLOWERS Problem DescriptionYou want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers, each being of a different kind, and at least as原创 2012-08-12 20:12:55 · 444 阅读 · 0 评论 -
DP动态规划——hdu 1008 Common Subsequence(最长公共子序列)
http://acm.hdu.edu.cn/showproblem.php?pid=1159点击打开链接 Common SubsequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s)原创 2012-08-12 20:02:00 · 634 阅读 · 0 评论 -
DP动态规划——最大数字子串
http://acm.nankai.edu.cn/p1760.html最大数字子串Time Limit: 1500 ms Memory Limit:10000 kB Judge type: Multi-casesTotal Submit : 1215 (245 users) Accepted Submit :397 (209 users) Page原创 2012-08-10 17:05:02 · 2865 阅读 · 0 评论 -
ACM 杭电hdu 2602 Bone Collector(01背包)
Bone Collector Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he w原创 2012-07-24 17:02:32 · 9902 阅读 · 0 评论 -
C++ string
之所以抛弃char*的字符串而选用C++标准程序库中的string类,是因为他和前者比较起来,不必 担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下(甚至是100%)的需要。我们可以用 = 进行赋值操作,== 进行比较,+ 做串联(是不是很简单?)。我们尽可以把它看成是C++的基本数据类型。 首先,为了在我们的程序中使用string类型转载 2012-08-27 15:43:22 · 738 阅读 · 0 评论