浙大PAT
闲云阁
闲云野鹤 -> 算法仿如酒心糖,嚼着嚼着就醉了
展开
-
1002. A+B for Polynomials (25)——PAT (Advanced Level) Practise
题目信息:1002. A+B for Polynomials (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time, you are supposed原创 2014-09-23 17:07:04 · 923 阅读 · 0 评论 -
1001. A+B Format (20) ——PAT (Advanced Level) Practise
题目信息:1001. A+B Format (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueCalculate a + b and output the sum原创 2014-09-23 17:06:44 · 835 阅读 · 0 评论 -
1005. Spell It Right (20)——PAT (Advanced Level) Practise
题目信息:1005. Spell It Right (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a non-negative integer N,原创 2014-09-23 17:18:54 · 848 阅读 · 0 评论 -
1004. Counting Leaves (30)——PAT (Advanced Level) Practise
题目信息:1004. Counting Leaves (30)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA family hierarchy is usually pre原创 2014-09-23 17:15:05 · 931 阅读 · 0 评论 -
1003. Emergency (25)——PAT (Advanced Level) Practise
题目信息:1003. Emergency (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAs an emergency rescue team leader of原创 2014-09-23 17:12:36 · 867 阅读 · 0 评论 -
1007. Maximum Subsequence Sum (25)——PAT (Advanced Level) Practise
题目信息:1007. Maximum Subsequence Sum (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a sequence of K i原创 2014-09-24 09:11:56 · 871 阅读 · 0 评论 -
1006. Sign In and Sign Out (25)——PAT (Advanced Level) Practise
题目信息:1006. Sign In and Sign Out (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAt the beginning of every原创 2014-09-24 09:12:02 · 832 阅读 · 0 评论 -
1009. Product of Polynomials (25)——PAT (Advanced Level) Practise
题目信息:1009. Product of Polynomials (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time, you are suppose原创 2014-09-24 09:17:06 · 736 阅读 · 0 评论 -
1008. Elevator (20)——PAT (Advanced Level) Practise
题目信息:1008. Elevator (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe highest building in our city has onl原创 2014-09-24 09:15:21 · 791 阅读 · 0 评论 -
1010. Radix (25)——PAT (Advanced Level) Practise
题目信息:1010. Radix (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a pair of positive integers, for exam原创 2014-09-24 09:20:37 · 937 阅读 · 0 评论 -
1012. The Best Rank (25)——PAT (Advanced Level) Practise
题目信息:1012. The Best Rank (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo evaluate the performance of ou原创 2014-09-25 17:49:46 · 805 阅读 · 0 评论 -
1015. Reversible Primes (20) ——PAT (Advanced Level) Practise
题目信息:1015. Reversible Primes (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA reversible prime in any num原创 2014-09-25 20:32:58 · 830 阅读 · 0 评论 -
1014. Waiting in Line (30)——PAT (Advanced Level) Practise
题目信息:1014. Waiting in Line (30)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose a bank has N windows op原创 2014-09-25 20:02:10 · 827 阅读 · 0 评论 -
1013. Battle Over Cities (25)——PAT (Advanced Level) Practise
题目信息:1013. Battle Over Cities (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIt is vitally important to h原创 2014-09-25 17:50:05 · 823 阅读 · 0 评论 -
1011. World Cup Betting (20)——PAT (Advanced Level) Practise
题目信息:1011. World Cup Betting (20)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueWith the 2010 FIFA World Cup ru原创 2014-09-25 17:47:25 · 755 阅读 · 0 评论 -
1016. Phone Bills (25)——PAT (Advanced Level) Practise
题目信息:1016. Phone Bills (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA long-distance telephone company c原创 2014-10-01 00:39:15 · 1264 阅读 · 0 评论 -
1068. Find More Coins (30)【背包】——PAT (Advanced Level) Practise
题目信息1068. Find More Coins (30)时间限制150 ms 内存限制65536 kB 代码长度限制16000 BEva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopp原创 2015-12-27 22:56:45 · 1397 阅读 · 0 评论 -
1069. The Black Hole of Numbers (20)【模拟】——PAT (Advanced Level) Practise
题目信息1069. The Black Hole of Numbers (20)时间限制100 ms 内存限制65536 kB 代码长度限制16000 BFor any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order原创 2015-12-27 23:01:17 · 1173 阅读 · 0 评论 -
1070. Mooncake (25)【贪心】——PAT (Advanced Level) Practise
题目信息1070. Mooncake (25)时间限制100 ms 内存限制65536 kB 代码长度限制16000 BMooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in原创 2015-12-27 23:03:26 · 1272 阅读 · 0 评论 -
1071. Speech Patterns (25)【字符串操作】——PAT (Advanced Level) Practise
题目信息1071. Speech Patterns (25)时间限制300 ms 内存限制65536 kB 代码长度限制16000 BPeople often have a preference among synonyms of the same word. For example, some may prefer “the police”, while others may prefer “原创 2015-12-27 23:05:52 · 1338 阅读 · 1 评论 -
1017. Queueing at Bank (25)——PAT (Advanced Level) Practise
题目信息1017.Queueing at Bank (25)时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 BSuppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into原创 2015-11-29 00:55:24 · 1098 阅读 · 1 评论 -
1060. Are They Equal (25)【字符串处理】——PAT (Advanced Level) Practise
题目信息1060. Are They Equal (25)时间限制50 ms 内存限制65536 kB 代码长度限制16000 BIf a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as原创 2015-12-16 23:12:12 · 777 阅读 · 0 评论 -
1072. Gas Station (30)【最短路dijkstra】——PAT (Advanced Level) Practise
题目信息1072. Gas Station (30)时间限制200 ms 内存限制65536 kB 代码长度限制16000 BA gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as原创 2016-01-02 19:59:35 · 1599 阅读 · 0 评论 -
1073. Scientific Notation (20)【字符串操作】——PAT (Advanced Level) Practise
题目信息1073. Scientific Notation (20)时间限制100 ms 内存限制65536 kB 代码长度限制16000 BScientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the原创 2016-01-02 20:04:59 · 1264 阅读 · 0 评论 -
1074. Reversing Linked List (25)【链表翻转】——PAT (Advanced Level) Practise
题目信息1074. Reversing Linked List (25)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BGiven a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, gi原创 2016-01-02 20:39:51 · 1465 阅读 · 0 评论 -
1018. Public Bike Management (30)——PAT (Advanced Level) Practise
题目信息1018. Public Bike Management (30)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BThere is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One原创 2015-12-01 18:59:53 · 1452 阅读 · 0 评论 -
1023. Have Fun with Numbers (20)【字符串操作】——PAT (Advanced Level) Practise
题目信息1023. Have Fun with Numbers (20)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BNotice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double i原创 2015-12-01 23:45:33 · 1470 阅读 · 0 评论 -
1025. PAT Ranking (25)【排序】——PAT (Advanced Level) Practise
题目信息1025. PAT Ranking (25)时间限制200 ms 内存限制65536 kB 代码长度限制16000 BProgramming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is suppo原创 2015-12-02 11:54:06 · 1220 阅读 · 0 评论 -
1026. Table Tennis (30)【排序+模拟+逻辑复杂】——PAT (Advanced Level) Practise
题目信息1026. Table Tennis (30)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BA table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are so原创 2015-12-02 16:16:44 · 1677 阅读 · 0 评论 -
1027. Colors in Mars (20)【进制转换】——PAT (Advanced Level) Practise
题目信息1027. Colors in Mars (20)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BPeople in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-d原创 2015-12-02 16:22:21 · 1116 阅读 · 0 评论 -
1020. Tree Traversals (25)——PAT (Advanced Level) Practise
题目信息1020. Tree Traversals (25)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BSuppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you原创 2015-12-01 21:41:15 · 1100 阅读 · 0 评论 -
1022. Digital Library (30)——PAT (Advanced Level) Practise
题目信息1022. Digital Library (30)时间限制1000 ms 内存限制65536 kB 代码长度限制16000 BA Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers,原创 2015-12-01 23:39:23 · 1280 阅读 · 0 评论 -
1028. List Sorting (25)【排序】——PAT (Advanced Level) Practise
题目信息1028. List Sorting (25)时间限制200 ms 内存限制65536 kB 代码长度限制16000 BExcel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test ca原创 2015-12-02 20:03:09 · 995 阅读 · 0 评论 -
1021. Deepest Root (25)【并查集+深搜】——PAT (Advanced Level) Practise
题目信息1021. Deepest Root (25)时间限制1500 ms 内存限制65536 kB 代码长度限制16000 BA graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are s原创 2015-12-01 21:45:05 · 1389 阅读 · 0 评论 -
1033. To Fill or Not to Fill (25)【贪心+模拟】——PAT (Advanced Level) Practise
题目信息1033. To Fill or Not to Fill (25)时间限制10 ms 内存限制65536 kB 代码长度限制16000 BWith highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limite原创 2015-12-03 19:40:07 · 1058 阅读 · 0 评论 -
1029. Median (25)【排序】——PAT (Advanced Level) Practise
题目信息1029. Median (25)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BGiven an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14}原创 2015-12-02 21:52:53 · 1555 阅读 · 2 评论 -
1030. Travel Plan (30)【最短路+路径记忆】——PAT (Advanced Level) Practise
题目信息1030. Travel Plan (30)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BA traveler’s map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to原创 2015-12-02 21:56:46 · 642 阅读 · 0 评论 -
1031. Hello World for U (20)【字符串处理】——PAT (Advanced Level) Practise
题目信息1031. Hello World for U (20)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BGiven any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, “helloworld” can be原创 2015-12-02 22:02:19 · 1096 阅读 · 0 评论 -
1032. Sharing (25)【链表】——PAT (Advanced Level) Practise
题目信息1032. Sharing (25) 时间限制100 ms 内存限制65536 kB 代码长度限制16000 BTo store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share原创 2015-12-02 23:29:29 · 1308 阅读 · 0 评论 -
1036. Boys vs Girls (25)【水题】——PAT (Advanced Level) Practise
题目信息1036. Boys vs Girls (25)时间限制400 ms 内存限制65536 kB 代码长度限制16000 BThis time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the fema原创 2015-12-04 16:50:48 · 896 阅读 · 0 评论