- 博客(17)
- 收藏
- 关注
原创 1121 Damn Single (25分)
1121 Damn Single (25分)“Damn Single (单身狗)” is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input Specification:Each input file contains one test case. For
2020-10-21 22:01:29 156 2
原创 1126 Eulerian Path (25分)
1126 Eulerian Path (25分)In graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an Eulerian circuit is an Eulerian path which starts and ends on the same vertex. They were first discussed by Leonhard Euler w
2020-10-21 21:45:48 93
原创 1155 Heap Paths (30分)
1155 Heap Paths (30分)In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (in a max heap) or less than or equa
2020-10-14 22:50:33 74
原创 1023 Have Fun with Numbers (20分)
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 consisting exactly the num
2020-10-11 19:46:57 76
原创 1022 Digital Library (30分)
1022 Digital Library (30分)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 as its ID. Given any query fro
2020-10-11 17:49:42 70
原创 1021 Deepest Root (25分)
1021 Deepest Root (25分)A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root is called the deepest root.Inpu
2020-09-28 22:35:06 101
原创 1019 General Palindromic Number (20分)
1019 General Palindromic Number (20分)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.Although palindr
2020-09-28 22:15:30 61
原创 1016 Phone Bills (25分)
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. When a customer starts connecting a lo
2020-09-27 20:17:19 56
原创 1015 Reversible Primes (20分)
1015 Reversible Primes (20分)A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime.Now given any two posi
2020-09-26 15:36:29 72
原创 1014 Waiting in Line (30分)
1014 Waiting in Line (30分)Suppose a bank has N windows 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 inside the yellow line in fr
2020-09-25 23:08:23 115 2
原创 1013 Battle Over Cities (25分)
1013 Battle Over Cities (25分)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 high
2020-09-24 22:16:33 58
原创 1012 The Best Rank (25分)
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 Algrbra), and E - English. At the mean time, we enco
2020-09-20 10:17:51 131
原创 1011 World Cup Betting (20分)
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 f
2020-09-18 23:32:24 87
原创 1010 Radix (25分)
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 tas
2020-09-18 19:41:12 133
原创 1009 Product of Polynomials (25分)
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 information of a polynomial:K
2020-09-16 22:24:41 50
原创 1001 A+B Format (20分)
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).Input Specification:
2020-09-16 20:18:26 185
原创 1004 Counting Leaves (30分)
1004 Counting Leaves (30分)A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case starts with a line containing 0<N&
2020-09-16 19:49:01 77
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人