- 博客(19)
- 收藏
- 关注
原创 10815
Andy's First DictionaryAndy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instea
2017-07-22 15:41:46 380
原创 HDU-3351
Problem DescriptionI’m out of stories. For years I’ve been writing stories, some rather silly, just to make simple problems look difficult and complex problems look easy. But, alas, not for this o
2017-07-22 15:28:27 304
转载 7.21比赛
N!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34687 Accepted Submission(s): 9711Problem DescriptionGiven an integer N(0 ≤
2017-07-22 15:26:18 269
转载 卡特兰数的递推公式
买票问题:一张票5元,有8个人有5元,8个人有10元,开始售票员没有钱,每人买一张票,求不发生售票员找不开钱的情况有多少种? 也是卡特兰数的变形,把有5元的看成1,10元的看成0,等价于n个1,n个0组成的2n为二进制数,从左往右,1的个数>=0的个数。从2n个位置填入n个1的方法有C(2n,n)种,其他位置自动填0;从C(2n,n)中减去不合法的即可;不合法
2017-07-22 15:21:13 6176 1
转载 C++中map的使用和基本操作
1、map简介map是一类关联式容器。它的特点是增加和删除节点对迭代器的影响很小,除了那个操作节点,对其他的节点都没有什么影响。对于迭代器来说,可以修改实值,而不能修改key。2、map的功能自动建立Key - value的对应。key 和 value可以是任意你需要的类型。 根据key值快速查找记录,查找的复杂度基本是Log(N),如果有1000个记录,最多查找10次,1,000
2017-07-22 08:08:39 313
原创 7.19
C. Lorenzo Von Matterhorntime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBarney lives in NYC. NYC has infinite number of intersections
2017-07-20 20:50:59 251
原创 7.19
1029: [JSOI2007]建筑抢修Time Limit: 4 Sec Memory Limit: 162 MBSubmit: 1869 Solved: 800[Submit][Status]Description小刚在玩JSOI提供的一个称之为“建筑抢修”的电脑游戏:经过了一场激烈的战斗,T部落消灭了所有z部落的入侵者。但是T部落的基地里已经有N个建筑设施受到了严
2017-07-20 20:38:19 191
原创 7.18
Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3732 Accepted Submission(s): 2248Problem DescriptionN
2017-07-20 20:33:34 213
原创 7.18
Problem DescriptionRay又对数字的列产生了兴趣:现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。Input每组数据占一行,代表四张卡片上的数字(0Output对每组卡片按从小到大的顺序输出所有能由这四张卡片组成的4位数,千位数字相同的在同一行,同一行中每个四位数间用空格分隔。每组输出数据间空一行
2017-07-20 20:25:43 192
原创 7.18
Team Queue问题描述 :Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday
2017-07-20 20:12:32 216
原创 7.18
Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to becorrect:(a) if it is the empty string (b) if A and B are correct, AB
2017-07-19 21:04:34 146
原创 7.18
B. Soldier and Badges//士兵与徽章问题time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputColonel has n badges. He wan
2017-07-19 20:52:01 345
原创 7.18
Ugly Numbers Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... shows the first 11 ugly numbers. By convention,
2017-07-19 20:42:27 204
原创 7.18
Problem Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一至三报数直到剩下的人数不超过三人为止。 Input本题有多
2017-07-19 20:27:54 170
原创 7.18
Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to becorrect:(a)if it is the empty string(b)if A and B are correct, AB is corr
2017-07-18 21:06:45 186
转载 7.18
2017 D题 火车问题DescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited
2017-07-18 21:02:42 180
原创 7.18
2017 D题 火车问题DescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited
2017-07-18 21:01:30 175
转载 7.17
排列问题:(K题)1,利用next_permutation()函数: boolean next_permutation(a.begin(),a.end()) 该函数是以输入字符串中的字符所构建的按字典顺序全排列中,判断当前字符串之后是否还有下一个字符串 如果next_permutation的执行次数少于全排列的个数,返回true 例如 a="abc" 全排列有
2017-07-17 20:34:00 161
原创 7.16总结
这一周的总知识点: STL(1) 大数问题:转化成字符串--->对齐(逆序对齐)--->做加减运算(2)堆栈:先进后出(3)队列:先进先出两者所共有的操作: push(); top(); pop(); empty();(4)优先队列(5)排列(6)map(7)桶排序(8)set(9)sort 排序 /
2017-07-17 20:31:04 195
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人