上一页 1 ··· 8 9 10 11 12 13 14 下一页
摘要: 描述 最近,小Hi很喜欢玩的一款游戏模拟城市开放出了新Mod,在这个Mod中,玩家可以拥有不止一个城市了! 但是,问题也接踵而来——小Hi现在手上拥有N座城市,且已知这N座城市中任意两座城市之间建造道路所需要的费用,小Hi希望知道,最少花费多少就可以使得任意两座城市都可以通过所建造的道路互相到达(假 阅读全文
posted @ 2017-08-03 08:29 Reqaw 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 题目: Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会. 魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回 阅读全文
posted @ 2017-08-02 20:50 Reqaw 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2412 题目: Benny has a spacious farm land to irrigate. The farm land is a rectangle, 阅读全文
posted @ 2017-08-01 22:58 Reqaw 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 that visits 阅读全文
posted @ 2017-08-01 22:40 Reqaw 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 a tile, 阅读全文
posted @ 2017-08-01 22:31 Reqaw 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目: The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region 阅读全文
posted @ 2017-08-01 22:00 Reqaw 阅读(665) 评论(0) 推荐(0) 编辑
摘要: 题目: A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adj 阅读全文
posted @ 2017-08-01 20:40 Reqaw 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 题目: The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie cou 阅读全文
posted @ 2017-08-01 13:17 Reqaw 阅读(1118) 评论(0) 推荐(1) 编辑
摘要: 题目: A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> anothe 阅读全文
posted @ 2017-08-01 12:55 Reqaw 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目: Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about t 阅读全文
posted @ 2017-08-01 12:44 Reqaw 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题目: Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5, 阅读全文
posted @ 2017-07-31 23:26 Reqaw 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 题目: Problem Description Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干 阅读全文
posted @ 2017-07-31 23:12 Reqaw 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s 阅读全文
posted @ 2017-07-31 22:54 Reqaw 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题目描述 zzq很喜欢下国际象棋,一天,他拿着国际象棋中的“马”时突然想到一个问题:给定两个棋盘上的方格a和b,马从a跳到b最少需要多少步?现请你编程解决这个问题。提示:国际象棋棋盘为8格*8格,马的走子规则为,每步棋先横走或直走一格,然后再往外斜走一格。 输入 输入包含多组测试数据。每组输入由两个 阅读全文
posted @ 2017-07-23 16:50 Reqaw 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 题目描述 小明置身于一个迷宫,请你帮小明找出从起点到终点的最短路程。小明只能向上下左右四个方向移动。 输入 输入包含多组测试数据。输入的第一行是一个整数T,表示有T组测试数据。每组输入的第一行是两个整数N和M(1<=N,M<=100)。接下来N行,每行输入M个字符,每个字符表示迷宫中的一个小方格。字 阅读全文
posted @ 2017-07-23 16:33 Reqaw 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 题目描述 现有n根木棒,已知它们的长度和重量。要用一部木工机一根一根地加工这些木棒。该机器在加工过程中需要一定的准备时间,是用于清洗机器,调整工具和模板的。木工机需要的准备时间如下:(1)第一根木棒需要1min的准备时间;(2)在加工了一根长为l,重为w的木棒之后,接着加工一根长为ll(l<=ll) 阅读全文
posted @ 2017-07-23 16:09 Reqaw 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 题目描述 现给你一个正整数N,请问N^N的最左边的数字是什么? 输入 输入包含多组测试数据。每组输入一个正整数N(N<=1000000)。 输出 对于每组输入,输出N^N的最左边的数字。 样例输入 3 4 样例输出 2 2题意描述:输入一个正整数N(N<=1000000)输出N^N的最左边的数字解题 阅读全文
posted @ 2017-07-22 16:17 Reqaw 阅读(742) 评论(0) 推荐(0) 编辑
摘要: 题目描述 最近zzq交了一个新朋友叫cj,他们在聊天的时候发现500年前他们竟然是一家人!现在zzq想知道cj是他的长辈,晚辈,还是兄弟。 输入 输入包含多组测试数据。每组首先输入一个整数N(N<=10),接下来N行,每行输入两个整数a和b,表示a的父亲是b(1<=a,b<=20)。zzq的编号为1 阅读全文
posted @ 2017-07-22 15:11 Reqaw 阅读(214) 评论(0) 推荐(1) 编辑
摘要: 题目来源:http://bailian.openjudge.cn/practice/2748/描述给定一个由不同的小写字母组成的字符串,输出这个字符串的所有全排列。 我们假设对于小写字母有'a' < 'b' < ... < 'y' < 'z',而且给定的字符串中的字母已经按照从小到大的顺序排列。 输 阅读全文
posted @ 2017-05-31 17:46 Reqaw 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 题目来源:http://bailian.openjudge.cn/practice/4070/描述对于数组[1, 2, 3],他们按照从小到大的全排列是1 2 31 3 22 1 32 3 13 1 23 2 1现在给你一个正整数n,n小于8,输出数组[1, 2, …,n]的从小到大的全排列。 输入 阅读全文
posted @ 2017-05-31 17:44 Reqaw 阅读(287) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 下一页