随笔分类 - 算法练习C++
做过的一些题目,使用C++的写程序
摘要:E - 广搜记录路径 基础 Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3984 E - 广搜记录路径 基础 Submit Status Practic
阅读全文
摘要:Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mob
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Submit Status Submit Status Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行
阅读全文
摘要:G - DFS(floodfill),推荐 Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status G - DFS(floodfill),推荐 Submit Status Descripti
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Description Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital
阅读全文
摘要:Description 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数
阅读全文
摘要: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
阅读全文
摘要:Description The only printer in the computer science students' union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs i
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:十进制-十六进制 Time Limit: 1 Sec Memory Limit: 128 MB Description 把十进制整数转换为十六进制,格式为0x开头,10~15由大写字母A~F表示。 Input 每行一个整数x,0<= x <= 2^31。 Output 每行输出对应的八位十六进制整数
阅读全文
摘要: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
阅读全文
摘要:The Unsolvable Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description There are many unsolvable
阅读全文