自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(56)
  • 收藏
  • 关注

原创 PAT - 甲级 - 1082. Read Number in Chinese (25)(字符串处理)

Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For example, -123456789 is read as "Fu yi Yi er Qian san B

2017-11-30 21:39:07 384 1

原创 PAT - 甲级 - 1077. Kuchiguse (20)(字符串处理)

The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such a preference is called

2017-11-30 21:31:36 1112

原创 PAT - 甲级 - 1073. Scientific Notation (20)(字符串处理)

Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9]"."[0-9]+E[+-][0-9]+ which means that the in

2017-11-30 21:25:33 290

原创 PAT - 甲级 - 1061. Dating (20)(字符串处理)

Sherlock Holmes received a note with some strange strings: "Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm". It took him only a minute to figure out that those strange strings are a

2017-11-30 21:19:22 313

原创 PAT - 甲级 - 1035. Password (20)(字符串处理)

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 l (L

2017-11-30 21:11:44 315

原创 PAT - 甲级 - 1001. A+B Format (20)(字符串处理)

Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).InputEach input file cont

2017-11-30 21:03:27 343

原创 PAT - 甲级 - 1058. A+B in Hogwarts (20)(进制转换)

If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Si

2017-11-29 22:16:08 217

原创 PAT - 甲级 1027. Colors in Mars (20)(进制转换)

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 2 dig

2017-11-29 22:11:29 181

原创 PAT - 甲级 - 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 region's culture. Now

2017-11-29 21:43:12 455

原创 PAT - 甲级 - 1067. Sort with Swap(0,*) (25)(模拟+贪心)

Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2

2017-11-29 21:36:28 296

原创 PAT - 甲级 - 1037. Magic Coupon (25)(贪心)

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 product b

2017-11-29 21:27:33 272

原创 PAT - 甲级 - 1033. To Fill or Not to Fill (25)(贪心)

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. Different ga

2017-11-28 11:41:15 444

原创 PAT - 甲级 - 1024. Palindromic Number (25)(大整数运算)

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 numbers

2017-11-27 19:07:54 288

原创 PAT - 甲级 - 1023. Have Fun with Numbers (20)(大整数)

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 number con

2017-11-27 16:24:31 442

原创 PAT - 甲级 - 1065. A+B and C (64bit) (20)(模拟)

Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (Output

2017-11-25 11:10:14 488

原创 PAT - 甲级 - 1051. Pop Sequence (25)(模拟)

Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of t

2017-11-25 11:02:52 463

原创 PAT - 甲级 - 1046. Shortest Distance (20)(模拟)

The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file c

2017-11-25 10:56:50 400

原创 PAT - 甲级 - 1042. Shuffling Machine (20)(模拟)

Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gambler

2017-11-25 10:49:22 405

原创 PAT - 甲级 - 1002. A+B for Polynomials (25)(模拟)

This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains the information of a p

2017-11-25 10:40:20 427

原创 PAT - 甲级 - 1009. Product of Polynomials (25)(模拟)

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 inf

2017-11-24 22:16:40 364

原创 PAT - 甲级 - 1017. Queueing at Bank (25)(模拟+排序)

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 yellow li

2017-11-24 20:37:37 388

原创 PAT - 甲级 - 1098. Insertion or Heap Sort (25)(排序)

According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. At each iteration, insertion sort removes one element from the input

2017-11-24 13:20:11 289

原创 PAT - 甲级 - 1083. List Grades (25)(排序)

Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades

2017-11-24 13:06:28 375

原创 PAT - 甲级 - 1080. Graduate Admission (30)(排序)

It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admissio

2017-11-24 12:58:33 535

原创 PAT - 甲级 - 1075. PAT Judge (25)(排序)

The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to generate the ranklist for PAT.Input Specification:Each input fil

2017-11-24 12:45:52 371

原创 PAT - 甲级 - 1062. Talent and Virtue (25)(排序)

About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virt

2017-11-24 12:34:55 272

原创 Pat - 甲级 - 1055. The World's Richest (25)(排序)

Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on the peopl

2017-11-24 12:27:59 446

原创 PAT - 甲级 - 1028. List Sorting (25)(排序)

Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N

2017-11-24 11:27:59 323

原创 PAT - 甲级 - 1025. PAT Ranking (25)(排序)

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 ranklists w

2017-11-19 20:59:45 407

原创 PAT - 甲级 - 1016. Phone Bills (25)(排序)

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. Wh

2017-11-19 19:54:34 480

原创 PAT - 甲级 - 1012. The Best Rank (25)(排序)

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 - Eng

2017-11-19 16:48:20 416

原创 PAT - 甲级 - 1071. Speech Patterns (25)(STL-map)

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 to narrow down a speaker

2017-11-18 16:32:30 388

原创 PAT - 甲级 - 1063. Set Similarity (25)(STL-set)

Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the total number of distinct n

2017-11-18 12:22:49 303

原创 PAT - 甲级 - 1054. The Dominant Color (20)(STL-map)

Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the d

2017-11-17 17:48:17 275

原创 PAT - 甲级 - 1047. Student List for Course (25)(STL-vector)

Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input S

2017-11-17 14:01:06 237

原创 PAT - 甲级 - 1022. Digital Library (30)(STL-map,set)

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a

2017-11-16 15:23:26 288

原创 PAT - 甲级 - 1039. Course List for Student (25)(STL-vecotr)

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 comes

2017-11-16 15:14:41 268

原创 PAT - 甲级 - 1084. Broken Keyboard (20)(Hash散列)

On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a string that you are supposed

2017-11-15 17:20:54 295

原创 PAT - 甲级 - 1050. String Subtraction (20)(Hash映射)

Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings. However,

2017-11-14 11:33:05 450

原创 PAT - 甲级 - 1048. Find Coins (25)(Hash映射)

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,

2017-11-14 11:25:46 366

空空如也

空空如也

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

TA关注的人

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