Boostable

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  PAT

浙大PAT平台上的程序设计题目
摘要: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 Each input file contains one test case. Each case starts with a line containing 0 2#include34intmain()5{6intN,M;7intTree[100][10... 阅读全文
posted @ 2014-02-10 15:07 Boostable 阅读(187) 评论(0) 推荐(0)

摘要: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 connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are marked on ... 阅读全文
posted @ 2014-02-09 20:23 Boostable 阅读(240) 评论(0) 推荐(0)

摘要:1002. A+B for Polynomials (25) This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: K N1 aN1 N2 aN2 ... NK aNK, where K is the numbe... 阅读全文
posted @ 2014-02-07 23:15 Boostable 阅读(195) 评论(0) 推荐(0)

摘要: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 Each input file contains one test case. Each case contains a pair of integers a and b where -1000000 2intmain()3{4inta,b... 阅读全文
posted @ 2014-02-07 23:12 Boostable 阅读(246) 评论(0) 推荐(0)