自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Emerson的铺子

如果文章对您有帮助请在右边点个“赞”~O(∩_∩)O谢谢!...

  • 博客(81)
  • 收藏
  • 关注

原创 停更通知~~

之前因为一些原因CSDN上的博客暂时停更,目前将继续进行更新和维护

2018-08-24 17:13:52 443

原创 Codeforces Round #559 (Div. 2)

题目链接:https://codeforc.es/contest/1159A.A pile of stones题目大意:给定一个区域,这个区域开始有多个石头存在(也有可能石头数为0),现在每次从这个区域拿去一个石头或者增加一个石头(“+”表示增加一个石头进来,“-”表示拿走一个石头),问最终该区域最少有多少个石头。解题思路:因为所有的操作都是合法的。那么将一个人的所有操作存进一个字符...

2019-05-13 18:24:43 304

原创 Educational Codeforces Round 64 (Rated for Div. 2)

题目链接:https://codeforces.com/contests/1156A. Inscribed Figures题目大意:假设1代表圆形,2代表正三角形,3代表正方形,那么如例一所示2 1 3就代表正三角形内接圆形,同时内接圆的内部再内接正方形。那么现在所需要求的就是通过不断内接图形最终有多少个交点,如果在这个过程中内接的图形与之有边重合则Infinite解题思路:分别画出...

2019-05-11 23:49:03 279

原创 [PAT-A] 1071 Speech Patterns(25)

查看更多关于PAT的技术文档题目描述People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can help ...

2018-10-10 15:38:37 251

原创 [PAT-A] 1070 Mooncake(25)

题目链接 - 技术文档题目描述Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the ...

2018-10-09 14:15:08 217

原创 [PAT-A] 1065 A+B and C (64bit) (20)

题目链接 - 技术文档题目描述Given three integers A, B and C in [-2063,2063]. you are supposed to tell whether A+B>C.Input Specification:The first line of the input gives the positive number of test cas...

2018-09-26 21:48:01 162

原创 [PAT-B] 1090 危险品装箱(25)

题目链接 - 技术文档题目描述 集装箱运输货物时,我们必须特别小心,不能把不相容的货物装在一只箱子里。比如氧化剂绝对不能跟易燃液体同箱,否则很容易造成爆炸。 本题给定一张不相容物品的清单,需要你检查每一张集装箱货品清单,判断它们是否能装在同一只箱子里。输入格式: 输入第一行给出两个正整数:N (≤10​4​​) 是成对的不相容物品的对数;M (≤100) 是集装箱货...

2018-09-15 17:22:38 792

原创 [PAT-B] 1089 狼人杀-简单版(20)

题目链接 - 技术文档题目描述 以下文字摘自《灵机一动·好玩的数学》:“狼人杀”游戏分为狼人、好人两大阵营。在一局“狼人杀”游戏中,1 号玩家说:“2 号是狼人”,2 号玩家说:“3 号是好人”,3 号玩家说:“4 号是狼人”,4 号玩家说:“5 号是好人”,5 号玩家说:“4 号是好人”。已知这 5 名玩家中有 2 人扮演狼人角色,有 2 人说的不是实话,有狼人撒谎但并不...

2018-09-15 17:19:11 1102

原创 [PAT-B] 1088 三人行(20)

题目链接 - 技术文档题目描述 子曰:“三人行,必有我师焉。择其善者而从之,其不善者而改之。” 本题给定甲、乙、丙三个人的能力值关系为:甲的能力值确定是 2 位正整数;把甲的能力值的 2 个数字调换位置就是乙的能力值;甲乙两人能力差是丙的能力值的 X 倍;乙的能力值是丙的 Y 倍。请你指出谁比你强应“从之”,谁比你弱应“改之”。输入格式: 输入在一行中给出三个数,依...

2018-09-15 17:11:37 478

原创 [PAT-B] 1087 有多少不同的值(20)

题目链接 - 技术文档题目描述 当自然数 n 依次取 1、2、3、……、N 时,算式 ⌊n/2⌋+⌊n/3⌋+⌊n/5⌋ 有多少个不同的值?(注:⌊x⌋ 为取整函数,表示不超过 x 的最大自然数,即 x 的整数部分。)输入格式: 输入给出一个正整数 N(2≤N≤10​4​​)。输出格式: 在一行中输出题面中算式取到的不同值的个数。输入样例: 2017输...

2018-09-15 17:06:54 444

原创 [PAT-B] 1086 就不告诉你 (15)

1086 就不告诉你 (15) 题目链接 项目地址 题目描述 做作业的时候,邻座的小盆友问你:“五乘以七等于多少?”你应该不失礼貌地围笑着告诉他:“五十三。”本题就要求你,对任何一对给定的正整数,倒着输出它们的乘积。输入格式: 输入在第一行给出两个不超过 1000 的正整数 A 和 B,其间以空格分隔。输出格式: 在一行中倒着输出 A 和 B 的...

2018-09-15 16:44:09 627

原创 [ PAT-A ] 1041 Be Unique (C++)

题目描述Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 10^4^]. The first one who ...

2018-08-23 14:12:16 246

原创 [ PAT-A ] 1040 Longest Symmetric String (C++)

题目描述Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given “Is PAT&TAP symmetric?”, the longest symmetric sub-string is “s PAT&TAP s”, ...

2018-08-23 13:23:43 270

原创 [ PAT-A ] 1039 Course List for Student (C++)

题目描述Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who ...

2018-08-21 18:00:49 180

原创 [ PAT-A ] 1038 Recover the Smallest Number (C++)

题目描述Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recover many numbers such like 32-321-3214-...

2018-08-21 17:56:39 210

原创 [ PAT-A ] 1037 Magic Coupon (C++)

题目描述The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get N times the value of that pro...

2018-08-19 11:59:31 224

原创 [ PAT-A ] 1036 Boys vs Girls (C++)

题目描述This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification: Each input file contains...

2018-08-18 11:43:10 171

原创 [ PAT-A ] 1035 Password (C++)

题目描述To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from...

2018-08-17 21:36:11 207

原创 [ PAT-A ] 1033 To Fill or Not to Fill (C++)

题目描述With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Differ...

2018-08-16 10:05:00 206

原创 [ PAT-A ] 1020 Tree Traversals (C++)

题目描述Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of t...

2018-08-15 23:09:39 247

原创 [ PAT-A ] 1032 Sharing (C++)

题目描述To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For ex...

2018-08-14 11:34:06 210

原创 [ PAT-A ] 1031 Hello World for U (C++)

题目描述Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, “helloworld” can be printed as: h    d e   ...

2018-08-13 12:37:52 162

原创 [ PAT-A ] 1029 Median(C++)

题目描述Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 12, and the median of S2 = { 9, 10, 15, 16, 1...

2018-08-13 12:26:58 277

原创 [ PAT-A ] 1028 List Sorting (C++)

题目描述Excel can sort records according to any column. Now you are supposed to imitate this function.Input Each input file contains one test case. For each case, the first line contains two integers...

2018-08-11 12:38:43 166

原创 [ PAT-A ] 1027 Colors in Mars (C++)

题目描述People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle...

2018-08-10 13:34:06 168

原创 [ PAT-A ] 1025 PAT Ranking (C++)

题目描述Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the rankl...

2018-08-08 14:09:30 237

原创 [ PAT-A ] 1024 Palindromic Number (C++)

题目描述A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic n...

2018-08-07 12:10:05 244

原创 [ PAT-A ] 1023 Have Fun with Numbers (C++)

题目描述 Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit nu...

2018-08-06 12:00:12 299

原创 [ PAT-A ] 1019 General Palindromic Number (C++)

题目描述A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic n...

2018-08-04 11:02:26 217

原创 [ PAT-A ] Queueing at Bank (C++)

题目描述Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yel...

2018-08-03 15:29:07 190

原创 [ PAT-A ] 1016 Phone Bills (C++)

题目描述A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made...

2018-08-02 17:52:14 217

原创 [ PAT-A ] 1015 Reversible Primes (C++)

题目描述A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is als...

2018-07-31 14:22:31 164

原创 [ PAT-A ] 1013 Battle Over Cities (C++)

[ PAT-A ] 1013 Battle Over Cities (C++)题目描述It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if ...

2018-07-30 16:33:25 282

原创 [ PAT-A ] 1012 The Best Rank (C++)

[ PAT-A ] 1012 The Best Rank (C++)题目描述To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algebra), and E...

2018-07-29 15:49:25 506

原创 [ PAT-A ] 1011 World Cup Betting (C++)

[ PAT-A ] 1011 World Cup Betting (C++)题目描述With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Afri...

2018-07-28 12:06:58 458

原创 [ PAT-A ] 1010 Radix (C++)

[ PAT-A ] 1010 Radix (C++)题目描述Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is “yes”, if 6 is a decimal number and 110 is a binary number. Now for any pair of posit...

2018-07-27 13:53:21 435

原创 [ PAT-A ] 1009 Product of Polynomials(C++)

[ PAT-A ] 1009 Product of Polynomials(C++)题目描述This time, you are supposed to find A*B where A and B are two polynomials.Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the i...

2018-07-26 13:29:59 306

原创 [ PAT-A ] 1008 Elevator (C++)

[ PAT-A ] 1008 Elevator (C++)题目描述The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs...

2018-07-24 10:56:59 271

原创 【PAT-B】1030 有几个PAT(C++)

题目描述题目描述 字符串APPAPT中包含了两个单词“PAT”,其中第一个PAT是第2位(P),第4位(A),第6位(T);第二个PAT是第3位(P),第4位(A),第6位(T)。 现给定字符串,问一共可以形成多少个PAT?输入描述: 输入只有一行,包含一个字符串,长度不超过105,只包含P、A、T三种字母。输出描述: 在一行中输出给定字符串中包含多少个PAT。由于结果可能比较...

2018-07-20 13:52:13 208

原创 【PAT-B】1029 到底买不买(C++)

题目描述题目描述 小红想买些珠子做一串自己喜欢的珠串。卖珠子的摊主有很多串五颜六色的珠串,但是不肯把任何一串拆散了卖。于是小红要你帮忙判断一下,某串珠子里是否包含了全部自己想要的珠子?如果是,那么告诉她有多少多余的珠子;如果不是,那么告诉她缺了多少珠子。 为方便起见,我们用[0-9]、[a-z]、[A-Z]范围内的字符来表示颜色。例如,YrR8RrY是小红想做的珠串;那么ppRYYGrrY...

2018-07-20 13:07:58 339

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除