- 博客(6)
- 问答 (1)
- 收藏
- 关注
原创 PAT (Advanced Level) 刷题记录 1049 Counting Ones (30分)
1049 Counting Ones (30分) The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1’s in 1, 10, 11, and 12. Input Spec
2020-05-18 21:03:28
161
原创 PAT (Advanced Level) 刷题记录 1046 Shortest Distance (20分)
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 contains one test case. For each c
2020-05-17 20:33:12
139
原创 PAT (Advanced Level) 刷题记录 1044 Shopping in Mars (25分)
1044 Shopping in Mars (25分) Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the payment, the chain can be cut at any position for only once and some of th
2020-05-17 12:45:37
236
原创 PAT (Advanced Level) 刷题记录 1075 PAT Judge (25分)
1075 PAT Judge (25分) The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT. Input Specification: Each input file contains one test case. For each case,
2020-05-11 23:17:11
194
原创 PAT (Advanced Level) 刷题记录 1051 Pop Sequence (25分) 模拟堆栈
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 the stack. For example, if M is 5 a
2020-05-10 11:44:36
146
原创 PAT (Advanced Level) 刷题记录 1033 To Fill or Not to Fill (25分) 贪心算法
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 w...
2020-05-05 15:38:38
136
空空如也
为什么结构体指针malloc之后 会显示无法显示内存?
2020-05-04
TA创建的收藏夹 TA关注的收藏夹
TA关注的人