PAT (Advanced Level) Practise
点十八
成就一番伟业的唯一途径就是热爱自己的事业。如果你还没能找到让自己热爱的事业,继续寻找,不要放弃。跟随自己的心,总有一天你会找到的。
展开
-
[PAT]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).InputEach input file contains原创 2014-07-21 15:26:08 · 650 阅读 · 0 评论 -
[PAT]1002. A+B for Polynomials (25)
This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains the information of a p原创 2014-07-21 19:57:27 · 1515 阅读 · 0 评论 -
[PAT]1005. Spell It Right (20)
/**************************************************************1005. Spell It Right (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a non-negative integer N, your task原创 2014-11-10 13:35:40 · 895 阅读 · 0 评论 -
[PAT]1006. Sign In and Sign Out (25)
/**************************************************************1006. Sign In and Sign Out (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAt the beginning of every day, the原创 2014-11-10 15:13:41 · 638 阅读 · 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原创 2014-11-14 21:36:39 · 522 阅读 · 0 评论 -
[PAT]1003. Emergency (25)
Dijkstra 算法流程如下:1.初始化,集合 K 中加入结点 1,结点 1 到结点 1 最短距离为 0,到其它结点为无穷(或不确定)。2.遍历与集合 K 中结点直接相邻的边(U,V,C),其中 U 属于集合 K,V不属于集合 K,计算由结点 1 出发按照已经得到的最短路到达 U,再由 U 经过该边到达 V 时的路径长度。比较所有与集合 K 中结点直接相邻的非集合 K 结点该路径长度,其原创 2014-11-15 22:45:46 · 698 阅读 · 0 评论 -
[PAT]1004. Counting Leaves (30)
/**************************************************************1004. Counting Leaves (30)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA family hierarchy is usually presented原创 2014-11-16 21:12:38 · 686 阅读 · 0 评论 -
[PAT]1020. Tree Traversals (25)
/**************************************************************1020. Tree Traversals (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary tr原创 2014-11-23 11:11:19 · 817 阅读 · 0 评论 -
[PAT]1087. All Roads Lead to Rome (30)
/**************************************************************1087. All Roads Lead to Rome (30)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIndeed there are many different t原创 2014-11-26 22:42:16 · 2194 阅读 · 0 评论