
STL
文章平均质量分 73
lucky_vikey
这个作者很懒,什么都没留下…
展开
-
全排列
next_permutation函数 标签: 杂谈 分类: 函数 这是一个求一个排序的下一个排列的函数,可以遍历全排列,要包含头文件 下面是以前的笔记 与之完全相反的函数还有prev_permutation (1) int 类型的next_permutation int main() { int a[3]; a[0]=1;a[1]=2;a[2]=3;转载 2014-08-06 21:23:28 · 393 阅读 · 0 评论 -
Orders
Orders Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9432 Accepted: 5756 Description The stores manager has sorted all kinds of goods in an alphabetical原创 2014-08-07 11:12:53 · 396 阅读 · 0 评论 -
Fermat’s Chirstmas Theorem
Fermat’s Chirstmas Theorem 题目描述 In a letter dated December 25, 1640; the great mathematician Pierre de Fermat wrote to Marin Mersenne that he just proved that an odd prime p is expressible as p原创 2014-08-07 20:52:45 · 386 阅读 · 0 评论 -
Surprising Strings
Surprising Strings Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5889 Accepted: 3856 Description The D-pairs of a string of letters are the ordered pairs原创 2014-08-07 20:37:35 · 346 阅读 · 0 评论 -
Hardwood Species
Hardwood Species Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 18478 Accepted: 7323 Description Hardwoods are the botanical group of trees that have bro原创 2014-08-07 20:34:50 · 259 阅读 · 0 评论 -
Sequence
Sequence Time Limit: 6000MS Memory Limit: 65536K Total Submissions: 7312 Accepted: 2415 Description Given m sequences, each contains n non-negative integer. Now we ma原创 2014-08-07 21:04:41 · 338 阅读 · 0 评论 -
Black Box
Black Box Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7301 Accepted: 2976 Description Our Black Box represents a primitive database. It can save an i原创 2014-08-07 21:00:27 · 480 阅读 · 0 评论 -
树-堆结构练习——合并果子之哈夫曼树
题目描述 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。多多决定把所有的果子合成一堆。 每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。可以看出,所有的果子经过n-1次合并之后,就只剩下一堆了。多多在合并果子时总共消耗的体力等于每次合并所消耗体力之和。 因为还要花大力气把这些果子搬回家,所以多多在合并果子时要尽可能地节省体力原创 2014-08-07 20:31:14 · 334 阅读 · 0 评论 -
Message Flood
题目描述 Well, how do you feel about mobile phone? Your answer would probably be something like that "It's so convenient and benefits people a lot". However, If you ask Merlin this question on the New原创 2014-08-07 20:47:50 · 396 阅读 · 0 评论