随笔分类 -  PAT

摘要:题目描述输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。Given a collection of number segments, you are supposed to... 阅读全文
posted @ 2016-01-25 22:19 小爷 阅读(534) 评论(0) 推荐(0)
摘要:The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. F 阅读全文
posted @ 2016-01-25 21:25 小爷 阅读(277) 评论(0) 推荐(0)
摘要:题目描述 HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学。今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决。但是,如果向量中包含负数,是否应该包含某个负数,并期望旁边的正数会弥补它呢?例如:{6,-3,-2,7,-15,1 阅读全文
posted @ 2016-01-25 18:59 小爷 阅读(271) 评论(0) 推荐(0)
摘要:时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIt is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 ... 阅读全文
posted @ 2015-03-01 15:51 小爷 阅读(257) 评论(0) 推荐(0)
摘要:Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is... 阅读全文
posted @ 2015-02-28 10:55 小爷 阅读(204) 评论(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, dependin... 阅读全文
posted @ 2015-02-26 23:54 小爷 阅读(243) 评论(0) 推荐(0)
摘要:时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIndeed there are many different tourist routes from our city to Rome. You are supposed to fi... 阅读全文
posted @ 2015-02-14 22:52 小爷 阅读(311) 评论(0) 推荐(0)
摘要:先要求出各个加油站 最短的 与任意一房屋之间的 距离D,再在这些加油站中选出最长的D的加油站 ,该加油站 为 最优选项 (坑爹啊!)。如果相同D相同 则 选离各个房屋平均距离小的,如果还是 相同,则 选 编号小的。 时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序S... 阅读全文
posted @ 2015-02-14 17:50 小爷 阅读(261) 评论(0) 推荐(0)
摘要:时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA traveler's map gives the distances between cities along the highways, together with the co... 阅读全文
posted @ 2015-02-14 15:23 小爷 阅读(131) 评论(0) 推荐(0)
摘要:时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThere is a public bike service in Hangzhou City which provides great convenience to the tour... 阅读全文
posted @ 2015-02-14 14:21 小爷 阅读(289) 评论(0) 推荐(0)
摘要:时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAs an emergency rescue team leader of a city, you are given a special map of your country. T... 阅读全文
posted @ 2015-02-13 22:52 小爷 阅读(179) 评论(0) 推荐(0)
摘要:时间限制3000 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueWeibo is known as the Chinese version of Twitter. One user on Weibo may have many followers... 阅读全文
posted @ 2015-02-13 18:28 小爷 阅读(193) 评论(0) 推荐(0)
摘要:时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven N rational numbers in the form "numerator/denominator", you are supposed to calculate ... 阅读全文
posted @ 2015-02-13 16:09 小爷 阅读(246) 评论(0) 推荐(0)
摘要:Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M 2 #include 3 #include 4 us... 阅读全文
posted @ 2015-02-13 10:00 小爷 阅读(189) 评论(0) 推荐(0)
摘要:时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- every... 阅读全文
posted @ 2015-02-10 08:28 小爷 阅读(194) 评论(0) 推荐(0)
摘要:时间限制250 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- every... 阅读全文
posted @ 2015-02-10 08:01 小爷 阅读(227) 评论(0) 推荐(0)
摘要:时间限制30 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueMice and Riceis the name of a programming contest in which each programmer must write a piece... 阅读全文
posted @ 2015-02-09 20:42 小爷 阅读(346) 评论(0) 推荐(0)
摘要:时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueBehind the scenes in the computer's memory, color is always talked about as a series of 24 b... 阅读全文
posted @ 2015-02-09 08:21 小爷 阅读(177) 评论(0) 推荐(0)
摘要:时间限制400 ms内存限制64000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueZhejiang University has 40000 students and provides 2500 courses. Now given the registered c... 阅读全文
posted @ 2015-02-08 16:33 小爷 阅读(163) 评论(0) 推荐(0)
摘要:时间限制50 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者HE, QinmingGiven any positive integer N, you are supposed to find all of its prime factors, and write ... 阅读全文
posted @ 2015-02-07 23:54 小爷 阅读(256) 评论(0) 推荐(0)