08 2015 档案

摘要:1056. Mice and Rice (25)时间限制30 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueMice and Riceis the name of a programming contest in which each progr... 阅读全文
posted @ 2015-08-31 18:10 Deribs4 阅读(217) 评论(0) 推荐(0)
摘要:1054. The Dominant Color (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueBehind the scenes in the computer's memory, color is always tal... 阅读全文
posted @ 2015-08-31 14:42 Deribs4 阅读(215) 评论(0) 推荐(0)
摘要:1055. The World's Richest (25)时间限制400 ms内存限制128000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueForbes magazine publishes every year its list of billionaires... 阅读全文
posted @ 2015-08-31 14:28 Deribs4 阅读(236) 评论(0) 推荐(0)
摘要:1053. Path of Equal Weight (30)时间限制10 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a non-empty tree with root R, and with weight Wiassigned... 阅读全文
posted @ 2015-08-31 11:37 Deribs4 阅读(530) 评论(0) 推荐(0)
摘要:1052. Linked List Sorting (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA linked list consists of a series of structures, which are no... 阅读全文
posted @ 2015-08-31 09:32 Deribs4 阅读(253) 评论(0) 推荐(0)
摘要:1051. Pop Sequence (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a stack which can keep M numbers at most. Push N numbers in the... 阅读全文
posted @ 2015-08-31 07:23 Deribs4 阅读(162) 评论(0) 推荐(0)
摘要:1050. String Subtraction (20)时间限制10 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven two strings S1and S2, S = S1- S2is defined to be the remai... 阅读全文
posted @ 2015-08-30 21:27 Deribs4 阅读(158) 评论(0) 推荐(0)
摘要:1048. Find Coins (25)时间限制50 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva loves to collect coins from all over the universe, including some ot... 阅读全文
posted @ 2015-08-30 19:03 Deribs4 阅读(228) 评论(0) 推荐(0)
摘要:1046. Shortest Distance (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe task is really simple: given N exits on a highway which form... 阅读全文
posted @ 2015-08-30 15:28 Deribs4 阅读(216) 评论(0) 推荐(0)
摘要:1045. Favorite Color Stripe (30)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva is trying to make her own color stripe out of a given on... 阅读全文
posted @ 2015-08-30 15:03 Deribs4 阅读(357) 评论(0) 推荐(0)
摘要:1044. Shopping in Mars (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueShopping in Mars is quite a different experience. The Mars people... 阅读全文
posted @ 2015-08-30 11:52 Deribs4 阅读(248) 评论(0) 推荐(0)
摘要:1043. Is It a Binary Search Tree (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA Binary Search Tree (BST) is recursively defined as a ... 阅读全文
posted @ 2015-08-30 10:00 Deribs4 阅读(231) 评论(0) 推荐(0)
摘要:1041. Be Unique (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueBeing unique is so important to people on Mars that even their lottery i... 阅读全文
posted @ 2015-08-30 08:35 Deribs4 阅读(217) 评论(0) 推荐(0)
摘要:1040. Longest Symmetric String (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a string, you are supposed to output the length of ... 阅读全文
posted @ 2015-08-30 01:37 Deribs4 阅读(296) 评论(0) 推荐(0)
摘要:1038. Recover the Smallest Number (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a collection of number segments, you are suppose... 阅读全文
posted @ 2015-08-30 00:35 Deribs4 阅读(277) 评论(0) 推荐(0)
摘要:1037. Magic Coupon (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe magic shop in Mars is offering some magic coupons. Each coupon ha... 阅读全文
posted @ 2015-08-29 14:40 Deribs4 阅读(244) 评论(0) 推荐(0)
摘要:1036. Boys vs Girls (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time you are asked to tell the difference between the lowest gr... 阅读全文
posted @ 2015-08-28 23:07 Deribs4 阅读(307) 评论(0) 推荐(0)
摘要:1031. Hello World for U (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven any string of N (>=5) characters, you are asked to form th... 阅读全文
posted @ 2015-08-28 22:39 Deribs4 阅读(201) 评论(0) 推荐(0)
摘要:1030. Travel Plan (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA traveler's map gives the distances between cities along the highways... 阅读全文
posted @ 2015-08-28 21:36 Deribs4 阅读(195) 评论(0) 推荐(0)
摘要:1028. List Sorting (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueExcel can sort records according to any column. Now you are supposed ... 阅读全文
posted @ 2015-08-28 19:56 Deribs4 阅读(203) 评论(0) 推荐(0)
摘要:1027. Colors in Mars (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YuePeople in Mars represent the colors in their computers in a similar... 阅读全文
posted @ 2015-08-28 19:29 Deribs4 阅读(246) 评论(0) 推荐(0)
摘要:1017. Queueing at Bank (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose a bank has K windows open for service. There is a yellow ... 阅读全文
posted @ 2015-08-28 17:45 Deribs4 阅读(289) 评论(0) 推荐(0)
摘要:1025. PAT Ranking (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueProgramming Ability Test (PAT) is organized by the College of Computer... 阅读全文
posted @ 2015-08-28 12:24 Deribs4 阅读(344) 评论(0) 推荐(0)
摘要:1023. Have Fun with Numbers (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueNotice that the number 123456789 is a 9-digit number consist... 阅读全文
posted @ 2015-08-28 00:56 Deribs4 阅读(292) 评论(0) 推荐(0)
摘要:1022. Digital Library (30)时间限制1000 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA Digital Library contains millions of books, stored according to... 阅读全文
posted @ 2015-08-28 00:13 Deribs4 阅读(268) 评论(0) 推荐(0)
摘要:1020. Tree Traversals (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary tree are distinct positive i... 阅读全文
posted @ 2015-08-27 09:26 Deribs4 阅读(177) 评论(0) 推荐(0)
摘要:1092. To Buy or Not to Buy (20)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva would like to make a string of beads with her favorite co... 阅读全文
posted @ 2015-08-27 02:53 Deribs4 阅读(236) 评论(0) 推荐(0)
摘要:1094. The Largest Generation (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA family hierarchy is usually presented by a pedigree tree ... 阅读全文
posted @ 2015-08-27 01:34 Deribs4 阅读(238) 评论(0) 推荐(0)
摘要:1093. Count PAT's (25)时间限制120 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CAO, PengThe stringAPPAPTcontains twoPAT's as substrings. The first one is form... 阅读全文
posted @ 2015-08-27 01:11 Deribs4 阅读(307) 评论(0) 推荐(0)
摘要:1019. General Palindromic Number (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA number that will be the same when it is written forwa... 阅读全文
posted @ 2015-08-26 18:20 Deribs4 阅读(210) 评论(0) 推荐(0)
摘要:1016. Phone Bills (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA long-distance telephone company charges its customers by the followi... 阅读全文
posted @ 2015-08-26 09:53 Deribs4 阅读(269) 评论(0) 推荐(0)
摘要:06-图7. How Long Does It Take (25)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueGiven the relations of all the activities of a project, you ... 阅读全文
posted @ 2015-08-25 02:59 Deribs4 阅读(370) 评论(0) 推荐(0)
摘要:06-图6. 公路村村通(30)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard现有村落间道路的统计数据表中,列出了有可能建设成标准公路的若干条道路的成本,求使每个村落都有公路连通所需要的最低成本。输入格式说明:输入数据包括城镇数目正整数N( 2 #inc... 阅读全文
posted @ 2015-08-25 02:15 Deribs4 阅读(1100) 评论(0) 推荐(0)
摘要:06-图5. 旅游规划(25)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最... 阅读全文
posted @ 2015-08-25 01:37 Deribs4 阅读(692) 评论(0) 推荐(0)
摘要:03-树1. 二分法求多项式单根(20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者杨起帆(浙江大学城市学院)二分法求函数根的原理为:如果连续函数f(x)在区间[a, b]的两个端点取值异号,即f(a)f(b) 2 #include 3 #incl... 阅读全文
posted @ 2015-08-22 07:46 Deribs4 阅读(224) 评论(0) 推荐(0)
摘要:05-图1. List Components (25)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueFor a given undirected graph with N vertices and E edges, please l... 阅读全文
posted @ 2015-08-21 16:27 Deribs4 阅读(227) 评论(0) 推荐(0)
摘要:06-图4. Saving James Bond - Hard Version (30)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueThis time let us consider the situation in the mo... 阅读全文
posted @ 2015-08-21 15:23 Deribs4 阅读(249) 评论(0) 推荐(0)
摘要:05-图3. 六度空间 (30)时间限制1500 ms内存限制65536 kB代码长度限制8000 B判题程序Standard“六度空间”理论又称作“六度分隔(Six Degrees of Separation)”理论。这个理论可以通俗地阐述为:“你和任何一个陌生人之间所间隔的人不会超过六个,也就是... 阅读全文
posted @ 2015-08-21 11:29 Deribs4 阅读(330) 评论(0) 推荐(0)
摘要:05-图2. Saving James Bond - Easy Version (25)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueThis time let us consider the situation in the mo... 阅读全文
posted @ 2015-08-19 16:42 Deribs4 阅读(204) 评论(0) 推荐(0)
摘要:04-树9. Path in a Heap (25)时间限制150 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueInsert a sequence of given numbers into an initially empty min-heap... 阅读全文
posted @ 2015-08-19 15:00 Deribs4 阅读(161) 评论(0) 推荐(0)
摘要:04-树8. Complete Binary Search Tree (30)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueA Binary Search Tree (BST) is recursively defined as a... 阅读全文
posted @ 2015-08-19 13:56 Deribs4 阅读(197) 评论(0) 推荐(0)
摘要:04-树7. Search in a Binary Search Tree (25)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueTo search a key in a binary search tree, we start f... 阅读全文
posted @ 2015-08-17 17:27 Deribs4 阅读(201) 评论(0) 推荐(0)
摘要:04-树5. File Transfer (25)时间限制150 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueWe have a network of computers and a list of bi-directional connecti... 阅读全文
posted @ 2015-08-16 01:29 Deribs4 阅读(223) 评论(0) 推荐(0)
摘要:04-树4. Root of AVL Tree (25)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueAn AVL tree is a self-balancing binary search tree. In an AVL tre... 阅读全文
posted @ 2015-08-15 16:43 Deribs4 阅读(196) 评论(0) 推荐(0)
摘要:03-树3. Tree Traversals Again (25)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueAn inorder binary tree traversal can be implemented in a non... 阅读全文
posted @ 2015-08-15 12:45 Deribs4 阅读(215) 评论(0) 推荐(0)
摘要:09-散列3. Hashing - Hard Version (30)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者HE, QinmingGiven a hash table of size N, we can define a hash funct... 阅读全文
posted @ 2015-08-14 21:27 Deribs4 阅读(821) 评论(0) 推荐(0)
摘要:09-散列1. Hashing (25)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueThe task of this problem is simple: insert a sequence of distinct positiv... 阅读全文
posted @ 2015-08-14 14:34 Deribs4 阅读(220) 评论(0) 推荐(0)
摘要:03-树2. List Leaves (25)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueGiven a tree, you are supposed to list all the leaves in the order of ... 阅读全文
posted @ 2015-08-14 08:13 Deribs4 阅读(215) 评论(0) 推荐(0)
摘要:02-线性结构4. Pop Sequence (25)时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueGiven a stack which can keep M numbers at most. Push N numbers in ... 阅读全文
posted @ 2015-08-13 22:30 Deribs4 阅读(718) 评论(0) 推荐(0)
摘要:02-线性结构3. 求前缀表达式的值(25)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard算术表达式有前缀表示法、中缀表示法和后缀表示法等形式。前缀表达式指二元运算符位于两个运算数之前,例如2+3*(7-4)+8/4的前缀表达式是:+ + 2 * 3 -... 阅读全文
posted @ 2015-08-13 21:15 Deribs4 阅读(308) 评论(0) 推荐(0)
摘要:02-线性结构2. 一元多项式求导 (25)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard设计函数求一元多项式的导数。(注:xn(n为整数)的一阶导数为n*xn-1。)输入格式:以指数递降方式输入多项式非零项系数和指数(绝对值均为不超过1000的整数)。... 阅读全文
posted @ 2015-08-13 00:57 Deribs4 阅读(227) 评论(0) 推荐(0)
摘要:02-线性结构1. Reversing Linked List (25)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueGiven a constant K and a singly linked list L, you are su... 阅读全文
posted @ 2015-08-11 13:52 Deribs4 阅读(200) 评论(0) 推荐(0)
摘要:00-自测5. Shuffling Machine (20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueShuffling is a procedure used to randomize a deck of playing ca... 阅读全文
posted @ 2015-08-10 00:26 Deribs4 阅读(272) 评论(0) 推荐(0)
摘要:00-自测2. 素数对猜想 (20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue让我们定义 dn为:dn= pn+1- pn,其中 pi是第i个素数。显然有 d1=1 且对于n>1有 dn是偶数。“素数对猜想”认为“存在无穷多对相... 阅读全文
posted @ 2015-08-09 23:21 Deribs4 阅读(273) 评论(0) 推荐(0)
摘要:00-自测4. Have Fun with Numbers (20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueNotice that the number 123456789 is a 9-digit number consis... 阅读全文
posted @ 2015-08-09 23:08 Deribs4 阅读(415) 评论(0) 推荐(0)
摘要:00-自测3. 数组元素循环右移问题 (20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard一个数组A中存有N(N>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(M>=0)个位置,即将A中的数据由(A0A1……AN-1)变换为(AN-... 阅读全文
posted @ 2015-08-08 18:36 Deribs4 阅读(449) 评论(0) 推荐(0)
摘要:00-自测1. 打印沙漏(20)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印***** *** * ********所谓“沙漏形状”,是指每... 阅读全文
posted @ 2015-08-08 13:29 Deribs4 阅读(333) 评论(0) 推荐(0)
摘要:1013. Battle Over Cities (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIt is vitally important to have all the cities connected by hig... 阅读全文
posted @ 2015-08-08 10:50 Deribs4 阅读(223) 评论(0) 推荐(0)
摘要:1015. Reversible Primes (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAreversible primein any number system is a prime whose "reverse"... 阅读全文
posted @ 2015-08-06 16:15 Deribs4 阅读(257) 评论(0) 推荐(0)
摘要:1014. Waiting in Line (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose a bank has N windows open for service. There is a yellow l... 阅读全文
posted @ 2015-08-06 15:29 Deribs4 阅读(308) 评论(0) 推荐(0)
摘要:1012. The Best Rank (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo evaluate the performance of our first year CS majored students, w... 阅读全文
posted @ 2015-08-04 21:00 Deribs4 阅读(224) 评论(0) 推荐(0)
摘要:1011. World Cup Betting (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueWith the 2010 FIFA World Cup running, football fans the world ov... 阅读全文
posted @ 2015-08-03 23:36 Deribs4 阅读(225) 评论(0) 推荐(0)