10 2017 档案

摘要:Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the 阅读全文
posted @ 2017-10-31 19:06 gaoren 阅读(192) 评论(0) 推荐(0)
摘要: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 @ 2017-10-30 19:12 gaoren 阅读(176) 评论(0) 推荐(0)
摘要:The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of e 阅读全文
posted @ 2017-10-29 09:21 gaoren 阅读(157) 评论(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 @ 2017-10-28 20:29 gaoren 阅读(189) 评论(0) 推荐(0)
摘要:Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "ins 阅读全文
posted @ 2017-10-27 21:21 gaoren 阅读(182) 评论(0) 推荐(0)
摘要:Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest sym 阅读全文
posted @ 2017-10-27 16:46 gaoren 阅读(213) 评论(0) 推荐(0)
摘要:Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the 阅读全文
posted @ 2017-10-27 16:24 gaoren 阅读(176) 评论(0) 推荐(0)
摘要:The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a produc 阅读全文
posted @ 2017-10-27 09:02 gaoren 阅读(316) 评论(0) 推荐(0)
摘要:This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Inp 阅读全文
posted @ 2017-10-26 19:48 gaoren 阅读(317) 评论(0) 推荐(0)
摘要:初次熟读TCP,随着TCP的发展路线对他深入了解,真心觉得TCP协议的美妙之处。他比UDP这家伙更加可靠,深得我们信任。通过一个个英文简写,例如CRC、ARQ、RTT、ACK、SACK、DACK等,组成网络的传输控制机制。他们相辅相成,最终实现人们对他的要求——可靠!接下来我们来聊一聊TCP简写的美 阅读全文
posted @ 2017-10-25 20:54 gaoren 阅读(348) 评论(0) 推荐(0)
摘要:With 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 gas s 阅读全文
posted @ 2017-10-25 09:44 gaoren 阅读(203) 评论(0) 推荐(0)
摘要:If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver 阅读全文
posted @ 2017-10-24 18:59 gaoren 阅读(167) 评论(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 @ 2017-10-23 20:24 gaoren 阅读(166) 评论(0) 推荐(0)
摘要:To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords 阅读全文
posted @ 2017-10-22 10:04 gaoren 阅读(244) 评论(0) 推荐(0)
摘要:To 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 same s 阅读全文
posted @ 2017-10-21 10:17 gaoren 阅读(210) 评论(0) 推荐(0)
摘要:Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as: That is 阅读全文
posted @ 2017-10-20 08:52 gaoren 阅读(239) 评论(0) 推荐(0)
摘要:A 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 progra 阅读全文
posted @ 2017-10-19 18:22 gaoren 阅读(215) 评论(0) 推荐(0)
摘要:Given 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, a 阅读全文
posted @ 2017-10-19 16:39 gaoren 阅读(178) 评论(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 @ 2017-10-19 08:53 gaoren 阅读(179) 评论(0) 推荐(0)
摘要:A 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 open 阅读全文
posted @ 2017-10-18 13:34 gaoren 阅读(312) 评论(0) 推荐(0)
摘要:Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run sim 阅读全文
posted @ 2017-10-17 10:36 gaoren 阅读(245) 评论(0) 推荐(0)
摘要:People 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-digit number, wher 阅读全文
posted @ 2017-10-16 09:14 gaoren 阅读(222) 评论(0) 推荐(0)
摘要:A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years 阅读全文
posted @ 2017-10-15 12:40 gaoren 阅读(179) 评论(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 @ 2017-10-14 15:37 gaoren 阅读(185) 评论(0) 推荐(0)
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2017-10-14 10:21 gaoren 阅读(176) 评论(0) 推荐(0)
摘要:Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 2469135 阅读全文
posted @ 2017-10-13 09:27 gaoren 阅读(504) 评论(0) 推荐(0)
摘要:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Each input file contain 阅读全文
posted @ 2017-10-12 09:47 gaoren 阅读(140) 评论(0) 推荐(0)
摘要:一、ARP的作用。 首先在window 的命令行中输入arp -a即可查看本机的arp缓存表。主机要发送数据包时,需要填充目的IP及其IP地址对应的MAC。当我们只有目的IP地址时,如何得到其对应的MAC地址? 此时ARP的作用就体现出来了。ARP就是通过IP来获取其对应的MAC地址。接下来阐述具体 阅读全文
posted @ 2017-10-11 18:38 gaoren 阅读(645) 评论(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 @ 2017-10-11 10:51 gaoren 阅读(147) 评论(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 @ 2017-10-10 09:39 gaoren 阅读(170) 评论(0) 推荐(0)
摘要:Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou 阅读全文
posted @ 2017-10-09 12:18 gaoren 阅读(237) 评论(1) 推荐(0)
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2017-10-08 19:12 gaoren 阅读(426) 评论(0) 推荐(0)
摘要: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 ro 阅读全文
posted @ 2017-10-07 09:53 gaoren 阅读(168) 评论(0) 推荐(0)
摘要:Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules 阅读全文
posted @ 2017-10-06 16:25 gaoren 阅读(278) 评论(0) 推荐(0)