PAT
Avatar_Unique
这个作者很懒,什么都没留下…
展开
-
PAT 1013 Battle Over Cities (25分) (DFS)
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 need to repair any other highways to keep the rest of the c原创 2020-09-21 10:19:50 · 86 阅读 · 0 评论 -
PAT 1012 The Best Rank (25分) (Hash)
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 Algrbra), and E - English. At the mean time, we encourage students by emphasi原创 2020-09-20 15:43:23 · 126 阅读 · 0 评论 -
PAT 1011 World Cup Betting (20分)
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 Africa. Similarly, football betting fans were putting their money原创 2020-09-19 11:33:41 · 72 阅读 · 0 评论 -
PAT 1010 Radix (25分)
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 positive integers N1N_1N1 and N2N_2N2, your task is to find the ra原创 2020-09-18 17:07:57 · 97 阅读 · 0 评论 -
PAT 1009 Product of Polynomials (25分)
This time, you are supposed to find A×BA\times BA×B where AAA and BBB are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:KN1aN1N2aN2⋯NKaNKK原创 2020-09-17 10:59:07 · 108 阅读 · 0 评论 -
PAT1008 Elevator (20分)
1008 Elevator (20分)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 6 seconds to move the elevator up one flo原创 2020-09-17 09:21:33 · 186 阅读 · 0 评论