随笔分类 -  PAT 甲级

摘要:Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to c 阅读全文
posted @ 2018-03-26 09:49 王清河 阅读(97) 评论(0) 推荐(0) 编辑
摘要:Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a numbe 阅读全文
posted @ 2018-03-25 20:43 王清河 阅读(109) 评论(0) 推荐(0) 编辑
摘要:Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of b 阅读全文
posted @ 2018-03-25 15:49 王清河 阅读(161) 评论(0) 推荐(0) 编辑
摘要:On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on sc 阅读全文
posted @ 2018-03-25 13:36 王清河 阅读(109) 评论(0) 推荐(0) 编辑
摘要:It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if 阅读全文
posted @ 2018-03-24 16:27 王清河 阅读(158) 评论(0) 推荐(0) 编辑
摘要:Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and 阅读全文
posted @ 2018-03-23 10:58 王清河 阅读(176) 评论(0) 推荐(0) 编辑
摘要:The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to generate the ranklist 阅读全文
posted @ 2018-03-23 10:23 王清河 阅读(137) 评论(0) 推荐(0) 编辑
摘要:Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to si 阅读全文
posted @ 2018-03-22 17:30 王清河 阅读(143) 评论(0) 推荐(0) 编辑
摘要:Excel can sort records according to any column. Now you are supposed to imitate this function. Input Each input file contains one test case. For each 阅读全文
posted @ 2018-03-22 09:13 王清河 阅读(91) 评论(0) 推荐(0) 编辑
摘要:A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi 阅读全文
posted @ 2018-03-21 18:48 王清河 阅读(155) 评论(0) 推荐(0) 编辑
摘要:There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any s 阅读全文
posted @ 2018-03-16 20:33 王清河 阅读(373) 评论(0) 推荐(0) 编辑
摘要:Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social n 阅读全文
posted @ 2018-03-16 14:57 王清河 阅读(135) 评论(0) 推荐(0) 编辑
摘要:One 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 re 阅读全文
posted @ 2018-03-16 13:58 王清河 阅读(305) 评论(0) 推荐(0) 编辑
摘要:A 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 the 阅读全文
posted @ 2018-03-15 19:52 王清河 阅读(141) 评论(0) 推荐(0) 编辑
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2018-03-15 14:12 王清河 阅读(106) 评论(0) 推荐(0) 编辑
摘要:A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer 阅读全文
posted @ 2018-03-15 10:49 王清河 阅读(141) 评论(0) 推荐(0) 编辑
摘要:A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer 阅读全文
posted @ 2018-03-15 10:25 王清河 阅读(140) 评论(0) 推荐(0) 编辑
摘要:To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mat 阅读全文
posted @ 2018-03-14 20:55 王清河 阅读(129) 评论(0) 推荐(0) 编辑
摘要:The following is from Max Howell @twitter: Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree on a 阅读全文
posted @ 2018-03-14 16:31 王清河 阅读(129) 评论(0) 推荐(0) 编辑
摘要:Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For exam 阅读全文
posted @ 2018-03-14 14:42 王清河 阅读(207) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示