
集训第一周
文章平均质量分 78
「已注销」
这个作者很懒,什么都没留下…
展开
-
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 · 229 阅读 · 0 评论 -
7.18
2017 D题 火车问题 Description There 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 · 195 阅读 · 0 评论 -
卡特兰数的递推公式
买票问题:一张票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 · 6286 阅读 · 1 评论 -
7.21比赛
N! Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 34687 Accepted Submission(s): 9711 Problem Description Given an integer N(0 ≤转载 2017-07-22 15:26:18 · 287 阅读 · 0 评论 -
HDU-3351
Problem Description I’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 · 316 阅读 · 0 评论 -
10815
Andy's First Dictionary Andy, 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 · 394 阅读 · 0 评论 -
7.18
Problem Description 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一至三报数直到剩下的人数不超过三人为止。 Input 本题有多原创 2017-07-19 20:27:54 · 183 阅读 · 0 评论 -
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 · 217 阅读 · 0 评论 -
7.18
B. Soldier and Badges//士兵与徽章问题 time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Colonel has n badges. He wan原创 2017-07-19 20:52:01 · 365 阅读 · 0 评论 -
7.18
2017 D题 火车问题 Description There 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 · 188 阅读 · 0 评论 -
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 · 337 阅读 · 0 评论 -
7.18
Problem Description Ray又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。 Input 每组数据占一行,代表四张卡片上的数字(0 Output 对每组卡片按从小到大的顺序输出所有能由这四张卡片组成的4位数,千位数字相同的在同一行,同一行中每个四位数间用空格分隔。 每组输出数据间空一行原创 2017-07-20 20:25:43 · 202 阅读 · 0 评论 -
7.18
Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3732 Accepted Submission(s): 2248 Problem Description N原创 2017-07-20 20:33:34 · 229 阅读 · 0 评论 -
7.19
1029: [JSOI2007]建筑抢修 Time Limit: 4 Sec Memory Limit: 162 MB Submit: 1869 Solved: 800 [Submit][Status] Description 小刚在玩JSOI提供的一个称之为“建筑抢修”的电脑游戏:经过了一场激烈的战斗,T部落消灭了所有z部落的入侵者。但是T部落的基地里已经有N个建筑设施受到了严原创 2017-07-20 20:38:19 · 203 阅读 · 0 评论 -
7.19
C. Lorenzo Von Matterhorn time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Barney lives in NYC. NYC has infinite number of intersections原创 2017-07-20 20:50:59 · 269 阅读 · 0 评论 -
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 · 212 阅读 · 0 评论 -
7.17
排列问题:(K题) 1,利用next_permutation()函数: boolean next_permutation(a.begin(),a.end()) 该函数是以输入字符串中的字符所构建的按字典顺序全排列中,判断当前字符串之后是否还有下一个字符串 如果next_permutation的执行次数少于全排列的个数,返回true 例如 a="abc" 全排列有转载 2017-07-17 20:34:00 · 176 阅读 · 0 评论 -
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 · 159 阅读 · 0 评论