
模拟题
ZCAIHUI_
卷又卷不过,躺又躺不平
展开
-
1148 Werewolf - Simple Version
1148 Werewolf - Simple Version(20 point(s))Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said...原创 2018-09-10 22:48:27 · 618 阅读 · 1 评论 -
1103 Integer Factorization (30 分)
TheK−Pfactorization of a positive integerNis to writeNas the sum of theP-th power ofKpositive integers. You are supposed to write a program to find theK−Pfactorization ofNfor any positive...原创 2019-08-23 17:09:12 · 312 阅读 · 0 评论 -
1049 Counting Ones (30 分)
The task is simple: given any positive integerN, you are supposed to count the total number of 1's in the decimal form of the integers from 1 toN. For example, givenNbeing 12, there are five 1's i...原创 2019-08-24 17:01:21 · 195 阅读 · 0 评论 -
1141 PAT Ranking of Institutions (25 分)
After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist.Input Specification:Each input file conta...原创 2019-08-27 21:18:23 · 165 阅读 · 0 评论 -
1014 Waiting in Line (30 分)
Suppose a bank hasNwindows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space...转载 2019-08-26 23:10:21 · 227 阅读 · 0 评论 -
1070 Mooncake (25 point(s))
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 ...原创 2019-08-18 10:42:09 · 163 阅读 · 0 评论 -
1109 Group Photo (25 point(s))
Formation is very important when taking a group photo. Given the rules of formingKrows withNpeople as the following: The number of people in each row must beN/K(round down to the nearest inte...原创 2019-08-17 23:06:55 · 151 阅读 · 0 评论 -
1153 Decode Registration Card of PAT (25 point(s))
A registration card number of PAT consists of 4 parts:the 1st letter represents the test level, namely,Tfor the top level,Afor advance andBfor basic; the 2nd - 4th digits are the test site nu...原创 2019-08-12 19:36:17 · 200 阅读 · 0 评论 -
1080 Graduate Admission (30 point(s))
It is said that in 2011, there are 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 admission...原创 2019-08-20 21:09:56 · 226 阅读 · 0 评论 -
1056 Mice and Rice (25 point(s))
Mice and Riceis the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as much rice...原创 2019-08-11 16:41:57 · 204 阅读 · 0 评论 -
1105 Spiral Matrix (25 分)
This time your job is to fill a sequence ofNpositive integers into aspiral matrixin non-increasing order. A spiral matrix is filled in from the first element at the upper-left corner, then move in...原创 2019-08-14 20:19:41 · 294 阅读 · 0 评论 -
1057 Stack (30 point(s))
Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the top position) and Po...原创 2019-04-26 00:11:41 · 223 阅读 · 0 评论 -
1137 Final Grading (25 point(s))
For a student taking the online course "Data Structures" on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/she must first obtain no less than 200 points from...原创 2019-04-14 00:11:01 · 205 阅读 · 0 评论