随笔分类 - PAT-A
摘要:1088. Rational Arithmetic For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, prod
阅读全文
摘要:1078. Hashing The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the i
阅读全文
摘要:1090. Highest Price in Supply Chain A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商) everyone involved in moving a
阅读全文
摘要:1064. Complete Binary Search Tree A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subt
阅读全文
摘要:1009. Product of Polynomials This time, you are supposed to find A B where A and B are two polynomials. Input Specification: Each input file contains
阅读全文
摘要:1002. A+B for Polynomials This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Eac
阅读全文
摘要:1004. Counting Leaves A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input E
阅读全文
摘要:1094. The Largest Generation A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same gener
阅读全文
摘要:1024. Palindromic Number A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 123432
阅读全文
摘要:1019. General Palindromic Number A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example
阅读全文
摘要:1048. Find Coins Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shoppi
阅读全文
摘要:1037. Magic Coupon The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this c
阅读全文
摘要:1099. Build A Binary Search Tree A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtr
阅读全文
摘要:1081. Rational Sum Given N rational numbers in the form "numerator/denominator", you are supposed to calculate their sum. Input Specification: Each in
阅读全文
摘要:1069. The Black Hole of Numbers For any 4 digit integer except the ones with all the digits being the same, if we sort the digits in non increasing or
阅读全文
摘要:1015. Reversible Primes A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the d
阅读全文