摘要: Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M #define LL long longusing n... 阅读全文
posted @ 2015-09-08 23:05 CAPOUIS 阅读(278) 评论(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 @ 2015-09-08 23:04 CAPOUIS 阅读(145) 评论(0) 推荐(0)
摘要: One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions ... 阅读全文
posted @ 2015-09-08 23:01 CAPOUIS 阅读(173) 评论(0) 推荐(0)
摘要: A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer... 阅读全文
posted @ 2015-09-08 12:02 CAPOUIS 阅读(203) 评论(0) 推荐(0)
摘要: According to Wikipedia:Insertion sortiterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertio... 阅读全文
posted @ 2015-09-08 11:17 CAPOUIS 阅读(179) 评论(0) 推荐(0)
摘要: For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Spe... 阅读全文
posted @ 2015-09-08 11:14 CAPOUIS 阅读(157) 评论(0) 推荐(0)
摘要: Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the g... 阅读全文
posted @ 2015-09-08 11:11 CAPOUIS 阅读(242) 评论(0) 推荐(0)
摘要: A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find t... 阅读全文
posted @ 2015-09-08 10:49 CAPOUIS 阅读(123) 评论(0) 推荐(0)
摘要: The stringAPPAPTcontains twoPAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by ... 阅读全文
posted @ 2015-09-08 10:20 CAPOUIS 阅读(137) 评论(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 @ 2015-09-08 10:18 CAPOUIS 阅读(174) 评论(0) 推荐(0)
摘要: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes w... 阅读全文
posted @ 2015-09-08 10:16 CAPOUIS 阅读(190) 评论(0) 推荐(0)
摘要: According to Wikipedia:Insertion sortiterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertio... 阅读全文
posted @ 2015-09-08 09:37 CAPOUIS 阅读(102) 评论(0) 推荐(0)