- 博客(12)
- 收藏
- 关注
原创 1089 Insert or Merge(PAT Advanced)
According to Wikipedia:Insertion sortiterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data,...
2020-04-27 11:13:16
172
原创 1131 Subway Map(PAT Advanced)
In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following figure shows the map of Beijing subway. Now you are supposed to help people with you...
2020-03-05 23:34:40
191
原创 1074 Reversing Linked List(PAT Advanced)
Given a constantKand a singly linked listL, you are supposed to reverse the links of everyKelements onL. For example, givenLbeing 1→2→3→4→5→6, ifK=3, then you must output 3→2→1→6→5→4; ifK=4,...
2020-02-26 14:31:38
142
原创 1065 A+B and C (64bit) (PAT Advanced) 坑点
Given three integersA,BandCin [−2^63,2^63], you are supposed to tell whetherA+B>C.Input Specification:The first line of the input gives the positive number of test cases,T(≤10). T...
2020-02-13 21:37:59
130
原创 1052 Linked List Sorting (PAT Advanced) 坑点
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integerkeyand aNextpointer to the next structure. Now give...
2020-02-08 19:31:36
202
原创 页表项长度的计算方法
Frame Number –It gives the frame number in which the current page you are looking for is present. The number of bits required depends on the number of frames.Frame bit is also known as address transl...
2019-12-09 15:26:14
4339
1
原创 1033 To Fill or Not to Fill (PAT Advanced) 坑点
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...
2019-01-11 21:12:23
521
1
原创 1026 Table Tennis (PAT Advanced) 坑点
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the ava...
2019-01-11 11:59:37
641
原创 1024 Palindromic Number (PAT Advanced) 坑点
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...
2019-01-10 16:06:34
319
原创 1029 Median(PAT Advanced)坑点
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, 17 } is...
2019-01-09 13:30:07
368
1
原创 1016 Phone Bills (PAT Advanced) 坑点
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. When...
2019-01-08 18:38:55
665
原创 1013 Battle Over Cities (PAT Advanced) 坑点
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 we nee...
2019-01-08 18:28:21
311
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人