![](https://img-blog.csdnimg.cn/20190927151043371.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
A专题
主要为vjudge的各个专题
第三题真的很简单qwq
学好编程
展开
-
A专题-03-STL-Andy‘s First Dictionary
Andy’s First Dictionary (UVA - 10815) 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. Instead of thinking up all the words himself, he ha原创 2020-08-12 16:07:31 · 113 阅读 · 0 评论 -
A专题-03-STL-寻找大富翁
寻找大富翁 (HDU - 3785) 浙江桐乡乌镇共有n个人,请找出该镇上的前m个大富翁. Input 输入包含多组测试用例. 每个用例首先包含2个整数n(0<n<=100000)和m(0<m<=10),其中: n为镇上的人数,m为需要找出的大富翁数, 接下来一行输入镇上n个人的财富值. n和m同时为0时表示输入结束. Output 请输出乌镇前m个大富翁的财产数,财产多的排前面,如果大富翁不足m个,则全部输出,每组输出占一行. Sample Input 3 1 2 5 -1 5 3原创 2020-08-12 12:14:34 · 143 阅读 · 0 评论 -
A专题-03-STL-产生冠军
产生冠军 (HDU - 2094) 有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。 球赛的规则如下: 如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。 如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。 根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场撕杀之后,确定是否已经实际上产生了冠军。 Input 输入含有一些选手群,每群选手都以一个整数n(n<1000)开头,原创 2020-08-12 12:08:34 · 111 阅读 · 0 评论 -
A专题-03-STL-A+B
A + B (HDU - 1228) 读入两个小于100的正整数A和B,计算A+B. 需要注意的是:A和B的每一位数字由对应的英文单词给出. Input 测试输入包含若干测试用例,每个测试用例占一行,格式为"A + B =",相邻两字符串有一个空格间隔.当A和B同时为0时输入结束,相应的结果不要输出. Output 对每个测试用例输出1行,即A+B的值. Sample Input one + two = three four + five six = zero seven + eight nine = ze原创 2020-08-12 12:03:04 · 103 阅读 · 0 评论 -
A专题-08数列 --- I - Look and Say
Look and Say The look and say sequence is defined as follows. Start with any string of digits as the first element in the sequence. Each subsequent element is defined from the previous one by “verball...原创 2020-04-27 18:03:01 · 223 阅读 · 0 评论 -
A专题-05递推与组合 --- C - 1sting
C - 1sting You will be given a string which only contains ‘1’; You can merge two adjacent ‘1’ to be ‘2’, or leave the ‘1’ there. Surly, you may get many different results. For example, given 1111 , yo...原创 2020-04-25 19:05:43 · 107 阅读 · 0 评论 -
A专题-02-simulation: E - The Collatz Sequence
E - The Collatz Sequence An algorithm given by Lothar Collatz produces sequences of integers, and is described as follows: Step 1: Choose an arbitrary positive integer A as the first item in the seque...原创 2020-04-14 22:27:13 · 199 阅读 · 0 评论 -
A专题-02-simulation: H - Throwing cards away I
simulation : H - Throwing cards away I 题目大意: Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as ther...原创 2020-04-14 17:53:22 · 134 阅读 · 0 评论