上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 20 下一页
摘要: 小希的迷宫 Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B, 阅读全文
posted @ 2016-11-23 17:38 Pic 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 食物链 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 65906 Accepted: 19437 Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动 阅读全文
posted @ 2016-11-23 17:33 Pic 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Problem Description TT and FF are ... friends. Uh... very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following g 阅读全文
posted @ 2016-11-20 22:33 Pic 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 对于a^b,普通的求法是用一个循环一直乘b个a,这样的方法对于某些题目来说可能显得比较慢。 二分快速幂是一种利用b的二进制特征来快速求a^b的算法。 例如: a = 2, b = 35 则b的二进制表示形式为100011 则 a^b = (2^32) * (2^2) * (2^1) 有了这样的思路之 阅读全文
posted @ 2016-11-15 10:46 Pic 阅读(160) 评论(0) 推荐(0) 编辑
摘要: ,N皇后问题 Problem Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘 阅读全文
posted @ 2016-11-11 22:07 Pic 阅读(313) 评论(0) 推荐(0) 编辑
摘要: Dating with girls(2) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1418 Accepted Submission(s) 阅读全文
posted @ 2016-11-11 11:31 Pic 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 二分是一种很有效的减少时间开销的策略, 我觉得单列出二分专题有些不太合理, 二分应该作为一中优化方法来考虑 这几道题都是简单的使用了二分方法优化, 二分虽然看似很简单, 但一不注意就会犯错. 在写二分时, 会遇到很多选择题, 很多"分叉路口", 要根据实际情况选择合适的"路" HDU2199 Can 阅读全文
posted @ 2016-11-10 20:23 Pic 阅读(247) 评论(0) 推荐(0) 编辑
摘要: A strange lift Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on 阅读全文
posted @ 2016-11-10 19:56 Pic 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 胜利大逃亡 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 21759 Accepted Submission(s): 8538 Problem 阅读全文
posted @ 2016-11-08 22:09 Pic 阅读(337) 评论(0) 推荐(0) 编辑
摘要: Piggy-Bank Problem Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for 阅读全文
posted @ 2016-11-06 22:19 Pic 阅读(234) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 20 下一页