摘要: #include//算法头文件sort(a,b)//默认升序sort(a,b,cmp)bool cmp( 类型, 类型){ }重载const bool operator list 对象queue对象stack对象priority_queue对象binary_search(头,尾,查找的数);迭代器queueiterator a; 阅读全文
posted @ 2013-08-14 17:18 一只蚊子 阅读(110) 评论(0) 推荐(0)
摘要: 稳定排序Time Limit : 3000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 51Accepted Submission(s) : 19Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description大家都知道,快速排序是不稳定的排序方法。如果对于数组中出现的任意a[i],a[j](i#includeusing namespace std;struct student{ stri... 阅读全文
posted @ 2013-08-14 14:47 一只蚊子 阅读(195) 评论(0) 推荐(0)
摘要: Max SumTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 51Accepted Submission(s) : 8Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-seq 阅读全文
posted @ 2013-08-14 11:17 一只蚊子 阅读(172) 评论(0) 推荐(0)
摘要: Least Common MultipleTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 43Accepted Submission(s) : 10Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest 阅读全文
posted @ 2013-08-13 20:44 一只蚊子 阅读(405) 评论(0) 推荐(0)
摘要: 字符串统计Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 26Accepted Submission(s) : 18Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description对于给定的一个字符串,统计其中数字字符出现的次数。Input输入数据有多行,第一行是一个整数n,表示测试实例的个数,后面跟着n行,每行包括一个由字母和数字组成的字符串。Output对于每 阅读全文
posted @ 2013-08-13 16:24 一只蚊子 阅读(134) 评论(0) 推荐(0)
摘要: 不容易系列之(3)—— LELE的RPG难题Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 21Accepted Submission(s) : 9Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即"可乐"),经过多方打探,某资 阅读全文
posted @ 2013-08-13 15:45 一只蚊子 阅读(154) 评论(0) 推荐(0)
摘要: 一只小蜜蜂...Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 20Accepted Submission(s) : 13Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。其中,蜂房的结构如下所示。Input输入数据的第一行是一个整数N,表示测试实 阅读全文
posted @ 2013-08-13 10:52 一只蚊子 阅读(110) 评论(0) 推荐(0)
摘要: A+BTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 79Accepted Submission(s) : 29Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description给定两个整数A和B,其表示形式是:从个位开始,每三位数用逗号","隔开。现在请计算A+B的结果,并以正常形式输出。Input输入包含多组数据数据,每组数据占一行,由两个整 阅读全文
posted @ 2013-08-12 21:28 一只蚊子 阅读(123) 评论(0) 推荐(0)
摘要: 亲和数Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 28Accepted Submission(s) : 17Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description古希腊数学家毕达哥拉斯在自然数研究中发现,220的所有真约数(即不是自身的约数)之和为: 1+2+4+5+10+11+20+22+44+55+110=284。 而284的所有真约数为1、2、 阅读全文
posted @ 2013-08-12 09:39 一只蚊子 阅读(174) 评论(0) 推荐(0)
摘要: 分拆素数和Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 4 Accepted Submission(s) : 2Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description把一个偶数拆成两个不同素数的和,有几种拆法呢?Input输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。Output对应每个偶数,输出其拆成不同素数的个 阅读全文
posted @ 2013-07-22 14:35 一只蚊子 阅读(138) 评论(0) 推荐(0)