随笔分类 - PTA
摘要: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 are
阅读全文
摘要: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 t
阅读全文
摘要: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 Prog
阅读全文
摘要: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 cont
阅读全文
摘要:1007 Maximum Subsequence Sum (25分) Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni
阅读全文
摘要: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. In
阅读全文
摘要:1003 Emergency (25分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities
阅读全文