PAT
文章平均质量分 77
dyeDeny
这个作者很懒,什么都没留下…
展开
-
PAT 1003. Emergency
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原创 2015-07-14 21:49:50 · 442 阅读 · 0 评论 -
PAT 1046-1057
1046. Shortest Distance(20)原题地址:http://www.patest.cn/contests/pat-a-practise/1046解题思路:无他。求距离的题目,最好选一个参考点保存各节点的位置,这样两节点间的距离由位置差即可求得。代码如下:#include #include #define MAXN 100005int dis原创 2015-09-11 17:33:16 · 560 阅读 · 0 评论 -
1033. To Fill or Not to Fill (25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1033With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find ga原创 2015-09-05 23:22:40 · 410 阅读 · 0 评论 -
1017. Queueing at Bank (25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1017Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All th原创 2015-09-05 21:48:38 · 360 阅读 · 0 评论 -
1025. PAT Ranking (25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1025Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run原创 2015-09-05 22:28:46 · 397 阅读 · 0 评论 -
1028. List Sorting (25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1028Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each原创 2015-09-05 23:03:39 · 459 阅读 · 0 评论 -
1034. Head of a Gang (30)
原题地址:http://www.patest.cn/contests/pat-a-practise/1034One way that the police finds the head of a gang is to check people’s phone calls. If there is a phone call between A and B, we say that A and B is原创 2015-09-05 23:30:15 · 515 阅读 · 0 评论 -
1030. Travel Plan (30)
原题地址:http://www.patest.cn/contests/pat-a-practise/1030A traveler’s map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a pro原创 2015-09-05 23:11:00 · 339 阅读 · 0 评论 -
1022. Digital Library (30)
原题地址:http://www.patest.cn/contests/pat-a-practise/1022A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published ye原创 2015-09-05 22:16:01 · 433 阅读 · 0 评论 -
1032. Sharing (25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1032To 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 the sam原创 2015-09-05 23:16:58 · 418 阅读 · 0 评论 -
1029. Median (25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1029Given 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} is 12原创 2015-09-05 23:08:17 · 457 阅读 · 0 评论 -
1026. Table Tennis (30)
原题地址:http://www.patest.cn/contests/pat-a-practise/1026A 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 some tables op原创 2015-09-05 22:57:57 · 591 阅读 · 0 评论 -
1021. Deepest Root (25)
原题地址:http://www.patest.cn/contests/pat-a-practise/1021A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find原创 2015-09-05 22:10:20 · 320 阅读 · 0 评论 -
1013. Battle Over Cities (25)
1013. Battle Over Cities (25)原题地址:http://www.patest.cn/contests/pat-a-practise/1013It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all原创 2015-09-05 21:23:13 · 327 阅读 · 0 评论 -
PAT 1001.A+B Format
原题地址: http://www.patest.cn/contests/pat-a-practise/1001 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 comma原创 2015-07-14 21:42:57 · 313 阅读 · 0 评论 -
PAT 1002. A+B for Polynomials
A+B for Polynomials (25)InputEach 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 number原创 2015-07-14 21:47:58 · 354 阅读 · 0 评论 -
PAT.1035-1045
早期代码使用 java , 后转c/c++。由于使用java代码的都是比较基础的题目,因此未贴出java代码。1035. Password (20)原题地址:http://www.patest.cn/contests/pat-a-practise/1035解题思路:简单字符串替换。1036. Boys vs Girls (25)原题地原创 2015-09-11 14:31:51 · 498 阅读 · 0 评论