07 2015 档案

摘要:Description Given a graph (V,E) where V is a set of nodes and E is a set of arcs in VxV, and an ordering on the elements in V, then the bandwidth of a 阅读全文
posted @ 2015-07-31 18:59 江南何采莲 阅读(219) 评论(0) 推荐(0)
摘要:Starting with x and repeatedly multiplying by x, we can compute x31 with thirty multiplications: The operation of squaring can appreciably shorten the 阅读全文
posted @ 2015-07-31 18:56 江南何采莲 阅读(237) 评论(0) 推荐(0)
摘要:Description Today on a lecture about strings Gerald learned a new definition of string equivalency. Two strings a and b of equal length are calledequi 阅读全文
posted @ 2015-07-28 21:16 江南何采莲 阅读(250) 评论(0) 推荐(0)
摘要:通过暴力或者dfs的方法可以很容易地得到n个数的全排列,可生成可重集的呢,例如给出一个数组a[],要求输出这个数组的全排列,与普通的求全排列不同,数组中很可能存在重复的数,所以方法都需要改一改: DFS #include"iostream" #include"cstring" #include"cs 阅读全文
posted @ 2015-07-27 18:37 江南何采莲 阅读(489) 评论(0) 推荐(0)
摘要:枚举,由已知条件推得y大于k,小于等于2K AC代码: #include"iostream"#include"cstring"using namespace std;const int maxn=20002;int a[maxn];int b[maxn];int main(){ int i,y; i 阅读全文
posted @ 2015-07-27 16:34 江南何采莲 阅读(395) 评论(0) 推荐(0)
摘要:Description A ring is composed of n (even number) circles as shown in diagram. Put natural numbers into each circle separately, and the sum of numbers 阅读全文
posted @ 2015-07-27 14:49 江南何采莲 阅读(200) 评论(0) 推荐(0)
摘要:Given a sequence of integers S = {S1, S2, ..., Sn}, you shoulddetermine what is the value of the maximum positive product involving consecutive terms 阅读全文
posted @ 2015-07-27 14:43 江南何采莲 阅读(407) 评论(0) 推荐(0)
摘要:Description Write a program that finds and displays all pairs of 5-digit numbers that between them use the digits 0 through 9 once each, such that the 阅读全文
posted @ 2015-07-27 14:36 江南何采莲 阅读(276) 评论(0) 推荐(0)
摘要:Description In this problem, you are given an integer number s. You can transform any integer number A to another integer number B by adding x to A. T 阅读全文
posted @ 2015-07-25 17:10 江南何采莲 阅读(251) 评论(0) 推荐(0)
摘要:Description You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend o 阅读全文
posted @ 2015-07-24 20:16 江南何采莲 阅读(242) 评论(0) 推荐(0)
摘要:You have just finished a compiler design homework question where you had to find the parse tree of an expression. Unfortunately you left your assignme 阅读全文
posted @ 2015-07-23 22:39 江南何采莲 阅读(333) 评论(0) 推荐(0)
摘要:In a country, there are a number of cities. Each pair of city is connected by a highway, bi-directional of course. A road-inspector’s task is to trave 阅读全文
posted @ 2015-07-23 17:10 江南何采莲 阅读(276) 评论(0) 推荐(0)
摘要:Description The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 slidin 阅读全文
posted @ 2015-07-23 14:51 江南何采莲 阅读(155) 评论(0) 推荐(0)
摘要:E - 广搜记录路径 基础 Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3984 E - 广搜记录路径 基础 Submit Status Practic 阅读全文
posted @ 2015-07-22 20:27 江南何采莲 阅读(607) 评论(0) 推荐(0)
摘要:Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mob 阅读全文
posted @ 2015-07-22 14:45 江南何采莲 阅读(454) 评论(0) 推荐(0)
摘要:Description Perhaps you all have heard the mythical story about Tower of Hanoi (The details of this story is not required to solve this problem): “The 阅读全文
posted @ 2015-07-22 09:19 江南何采莲 阅读(329) 评论(0) 推荐(0)
摘要:Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Submit Status Description A math instructor is too lazy to grade a 阅读全文
posted @ 2015-07-21 21:20 江南何采莲 阅读(219) 评论(0) 推荐(0)
摘要:Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From 阅读全文
posted @ 2015-07-21 16:38 江南何采莲 阅读(278) 评论(0) 推荐(0)
摘要:Submit Status Submit Status Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行 阅读全文
posted @ 2015-07-21 16:14 江南何采莲 阅读(158) 评论(0) 推荐(0)
摘要:G - DFS(floodfill),推荐 Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status G - DFS(floodfill),推荐 Submit Status Descripti 阅读全文
posted @ 2015-07-21 15:00 江南何采莲 阅读(282) 评论(0) 推荐(0)
摘要:Description A robot has to patrol around a rectangular area which is in a form of mxn grid (m rows and n columns). The rows are labeled from 1 to m. T 阅读全文
posted @ 2015-07-21 11:20 江南何采莲 阅读(212) 评论(0) 推荐(0)
摘要:Description A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves tha 阅读全文
posted @ 2015-07-21 08:40 江南何采莲 阅读(210) 评论(0) 推荐(0)
摘要:Description Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital 阅读全文
posted @ 2015-07-20 20:33 江南何采莲 阅读(268) 评论(0) 推荐(0)
摘要:Description 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数 阅读全文
posted @ 2015-07-20 19:41 江南何采莲 阅读(276) 评论(0) 推荐(0)
摘要:Description You are given a string consisting of parentheses () and []. A string of this type is said to be correct: (a)if it is the empty string(b)if 阅读全文
posted @ 2015-07-20 08:57 江南何采莲 阅读(246) 评论(0) 推荐(0)
摘要:Description The only printer in the computer science students' union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs i 阅读全文
posted @ 2015-07-20 07:53 江南何采莲 阅读(310) 评论(0) 推荐(0)
摘要:You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is theconcatenation of exac 阅读全文
posted @ 2015-07-19 22:02 江南何采莲 阅读(439) 评论(1) 推荐(1)
摘要:Description I mean your borrowers of books - those mutilators of collections, spoilers of the symmetry of shelves, and creators of odd volumes. - (Cha 阅读全文
posted @ 2015-07-19 21:24 江南何采莲
摘要:Your non-profit organization (iCORE - international Confederation of Revolver Enthusiasts) coordinates a very successful foreign student exchange prog 阅读全文
posted @ 2015-07-17 19:36 江南何采莲 阅读(122) 评论(0) 推荐(0)
摘要:Description The figure shown on the left is left-right symmetric as it is possible to fold the sheet of paper along a vertical line, drawn as a dashed 阅读全文
posted @ 2015-07-17 19:09 江南何采莲 阅读(293) 评论(0) 推荐(0)
摘要:十进制-十六进制 Time Limit: 1 Sec Memory Limit: 128 MB Description 把十进制整数转换为十六进制,格式为0x开头,10~15由大写字母A~F表示。 Input 每行一个整数x,0<= x <= 2^31。 Output 每行输出对应的八位十六进制整数 阅读全文
posted @ 2015-07-17 16:05 江南何采莲 阅读(230) 评论(0) 推荐(0)
摘要:UVA11877 The Coco-Cola Store Once upon a time, there is a special coco-cola store. If you return three empty bottles to the shop, you’ll get a full bo 阅读全文
posted @ 2015-07-17 15:49 江南何采莲 阅读(421) 评论(0) 推荐(0)
摘要:The Unsolvable Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description There are many unsolvable 阅读全文
posted @ 2015-07-17 15:29 江南何采莲 阅读(211) 评论(0) 推荐(0)
摘要:1021: 组合数末尾的零 Description 从m个不同元素中取出n (n ≤ m)个元素的所有组合的个数,叫做从m个不同元素中取出n个元素的组合数。组合数的计算公式如下: C(m, n) = m!/((m - n)!n!) 现在请问,如果将组合数C(m, n)写成二进制数,请问转这个二进制数 阅读全文
posted @ 2015-07-17 11:23 江南何采莲 阅读(458) 评论(0) 推荐(0)
摘要:Crossing River Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 11814 Accepted: 4476 Description A group of N people wishes to go across a r 阅读全文
posted @ 2015-07-16 21:55 江南何采莲 阅读(668) 评论(0) 推荐(0)
摘要:Throwing cards away I Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is& 阅读全文
posted @ 2015-07-16 21:36 江南何采莲 阅读(312) 评论(0) 推荐(0)
摘要:A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1, a2, ... , an), the next n-tuple in the sequence is formed by 阅读全文
posted @ 2015-07-16 21:20 江南何采莲 阅读(382) 评论(0) 推荐(0)