PAT TOP
文章平均质量分 88
kircher
这个作者很懒,什么都没留下…
展开
-
PAT TOP 1016. Uniqueness of MST (35)
问题描述:1016. Uniqueness of MST (35)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueGiven any weighted undirected graph, there exists at least one minimum spanning tree (MST) if the graph is con...原创 2018-03-14 21:56:22 · 662 阅读 · 2 评论 -
PAT TOP 1027 Larry and Inversions (35)
问题描述:1027 Larry and Inversions (35 分)Larry just studied the algorithm to count number of inversions. He's very interested in it. He's considering another problem: Given a permutation of integers f...原创 2018-12-30 20:04:51 · 555 阅读 · 5 评论 -
PAT TOP 1026 String of Colorful Beads (35)
问题描述:1026 String of Colorful Beads (35 分)Eva would like to buy a string of beads with no repeated colors so she went to a small shop of which the owner had a very long string of beads. However the...原创 2019-01-01 15:00:03 · 352 阅读 · 0 评论 -
PAT TOP 1023 The Best Polygon (35)
问题描述:1023 The Best Polygon (35 分)An n-gon is a polygon with n sides. For example, a triangle is a 3-gon. Now you are asked to find the best n-gon in a given convex N-gon. The vertices of the n-gon...原创 2019-01-05 23:01:52 · 699 阅读 · 3 评论 -
PAT TOP 1025 Keep at Most 100 Characters (35)
问题描述:1025 Keep at Most 100 Characters (35 分)Given a string which contains only lower case letters, how many different non-empty strings you can get if you can keep AT MOST 100 characters in the or...原创 2019-01-02 20:13:22 · 784 阅读 · 0 评论 -
PAT TOP 1007 Red-black Tree (35)
问题描述:1007 Red-black Tree (35 分)There is a kind of binary tree named red-black tree in the data structure. It has the following 5 properties:(1) Every node is either red or black. (2) The root i...原创 2019-01-17 16:10:33 · 712 阅读 · 0 评论 -
PAT TOP 1006 Tree Traversals - Hard Version (35)
问题描述:1006 Tree Traversals - Hard Version (35 分)Given the partial results of a binary tree's traversals in in-order, pre-order, and post-order. You are supposed to output the complete results and t...原创 2019-01-21 16:51:40 · 4680 阅读 · 0 评论 -
PAT TOP 1003 Universal Travel Sites (35)
1003 Universal Travel Sites (35 分)After finishing her tour around the Earth, CYLL is now planning a universal travel sites development project. After a careful investigation, she has a list of capac...原创 2019-01-26 21:36:17 · 1181 阅读 · 0 评论 -
PAT TOP 1002 Business (35)
1002 Business (35 分)As the manager of your company, you have to carefully consider, for each project, the time taken to finish it, the deadline, and the profit you can gain, in order to decide if yo...原创 2019-01-26 22:39:25 · 425 阅读 · 0 评论 -
PAT TOP 1001 Battle Over Cities - Hard Version (35)
问题描述:1001 Battle Over Cities - Hard Version (35 分)It is vitally important to have all the cities connected by highways in a war. If a city is conquered by the enemy, all the highways from/toward t...原创 2019-01-27 19:16:05 · 481 阅读 · 0 评论 -
PAT TOP 1005 Programming Pattern (35)
问题描述:1005 Programming Pattern (35 分)Programmers often have a preference among program constructs. For example, some may prefer if(0==a), while others may prefer if(!a). Analyzing such patterns can...原创 2019-02-01 22:09:48 · 316 阅读 · 0 评论 -
PAT TOP 代码页目录
题目名 备注信息 1001 Battle Over Cities - Hard Version (35 分) mst最小生成树 1002 Business (35 分) dp动态规划 1003 Universal Travel Sites (35 分) 最大流最小割 1004 To Buy or Not to Buy - Hard Versi...原创 2019-02-02 11:47:00 · 1209 阅读 · 0 评论 -
PAT TOP 1012 Greedy Snake (35)
问题描述:1012 Greedy Snake (35 分)Have you ever played the game "Greedy Snake"? In the game, we control the movements of the snake to eat the fruits scattered in the game field, while the snake's body ...原创 2019-01-30 00:15:10 · 448 阅读 · 0 评论 -
PAT TOP 1024 Currency Exchange Centers (35)
问题描述:1024 Currency Exchange Centers (35 分)There are currently 168 internationally recognized unique national currencies in this world. But let us assume that we have business with other species in...原创 2019-01-03 21:58:38 · 960 阅读 · 1 评论 -
PAT TOP 1022. Werewolf (35)
问题描述:1022. Werewolf (35)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueWerewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Sup...原创 2018-04-02 17:38:39 · 4409 阅读 · 0 评论 -
PAT TOP 1008. Airline Routes (35)
问题描述:1008. Airline Routes (35)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueGiven a map of airline routes, you are supposed to check if a round trip can be planned between any pair of citie...原创 2018-03-08 21:59:39 · 337 阅读 · 1 评论 -
PAT TOP 1011. Cut Rectangles (35)
问题描述:1011. Cut Rectangles (35)时间限制150 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者LIU, RujiaWhen a rectangle is cut by a straight line, we can easily obtain two polygons as the result. But the reversed pr...原创 2018-03-09 22:37:45 · 488 阅读 · 0 评论 -
PAT TOP 1021. Safe Fruit (35)
问题描述:1021. Safe Fruit (35)时间限制1500 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueThere are a lot of tips telling us that some fruits must not be eaten with some other fruits, or we might get oursel...原创 2018-03-02 15:55:40 · 3293 阅读 · 0 评论 -
PAT TOP 1013. Image Segmentation (35)
问题描述:1013. Image Segmentation (35)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者ZHU, JiankeImage segmentation is usually formulated as a graph partition problem, where each segment corresponds to a ...原创 2018-03-16 19:36:19 · 2071 阅读 · 0 评论 -
PAT TOP 1017. The Best Peak Shape (35)
问题描述:1017. The Best Peak Shape (35)时间限制1000 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueIn many research areas, one important target of analyzing data is to find the best "peak shape" out of a hu...原创 2018-03-10 19:57:06 · 704 阅读 · 0 评论 -
PAT TOP 1020. Delete At Most Two Characters (35)
1020. Delete At Most Two Characters (35)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CAO, PengGiven a string which contains only lower case English letters, how many different strings you can get a...原创 2018-03-03 23:00:26 · 569 阅读 · 1 评论 -
PAT TOP 1009. Triple Inversions (35)
问题描述:1009. Triple Inversions (35)时间限制300 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CAO, PengGiven a list of N integers A1, A2, A3,...AN, there's a famous problem to count the number of inversions in it....原创 2018-03-11 17:01:58 · 249 阅读 · 0 评论 -
PAT TOP 1010. Lehmer Code (35)
问题描述:1010. Lehmer Code (35)时间限制300 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者LIU, YaotingAccording to Wikipedia: "In mathematics and in particular in combinatorics, the Lehmer code is a particular way t...原创 2018-03-12 10:10:48 · 356 阅读 · 0 评论 -
PAT TOP 1018. Subnumbers (35)
问题描述:1018. Subnumbers (35)时间限制300 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CAO, PengGiven a positive integer N, let us define a "subnumber" of N as a consecutive number of digits NOT starting with 0. F...原创 2018-03-05 17:28:13 · 462 阅读 · 0 评论 -
PAT TOP 1014. Circles of Friends (35)
问题描述:1014. Circles of Friends (35)时间限制1000 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueA circle of friends is a network of friend relationships. If A is a friend of B, then B is considered a frie...原创 2018-03-05 23:17:37 · 381 阅读 · 0 评论 -
PAT TOP 1004. To Buy or Not to Buy - Hard Version (35)
问题描述:1004. To Buy or Not to Buy - Hard Version (35)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueEva would like to make a string of beads with her favorite colors so she went to a small sho...原创 2018-03-13 23:02:01 · 544 阅读 · 3 评论 -
PAT TOP 1015. Letter-moving Game (35)
问题描述:1015. Letter-moving Game (35)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CAO, PengHere is a simple intersting letter-moving game. The game starts with 2 strings S and T consist of lower case ...原创 2018-03-14 14:35:25 · 292 阅读 · 0 评论 -
PAT TOP 1019 Separate the Animals (35)(Python3)
问题描述:1019 Separate the Animals (35 分)There are some animals in a zoo which can be described as a grid with N rows and M columns. Your task is to place some obstacles so that no pairs of animals ca...原创 2019-01-30 20:01:39 · 678 阅读 · 1 评论