博客园 首页 私信博主 显示目录 隐藏目录 管理
摘要: Sample Input8 20 25 34 11 27 210 213 316 219 43 10 13 59 36 13 10 15 31 19 1Sample Output62-1题目大意:有一块草坪,长为l,宽为w,在它的水平中心线上有n个位置可以安装喷水装置,各个位置上的喷水装置的覆盖范围... 阅读全文
posted @ 2015-08-05 21:25 hfcnal 阅读(923) 评论(0) 推荐(1) 编辑
摘要: B -二分Time Limit:3000MSMemory Limit:0KB64bit IO Format:%lld & %lluDescriptionBefore the invention of book-printing, it was very hard to make a copy of ... 阅读全文
posted @ 2015-08-05 18:32 hfcnal 阅读(505) 评论(0) 推荐(1) 编辑
摘要: 设有n=2k个选手参加比赛,要求设计一个满足一下要求的比赛日程表:(1)每个选手必须与其他的n-1个选手个比赛一次;(2)每个选手每天只能赛一次 。(3)循环赛一共进行n-1天设计一个比赛日程表,该表有n行和n-1列,第i行j列为第i个选手第j天遇到的选手#include#includeint a[... 阅读全文
posted @ 2015-08-05 15:37 hfcnal 阅读(583) 评论(0) 推荐(1) 编辑
摘要: 问题描述: 在一个2^k×2^k个方格组成的棋盘中,若有一个方格与其他方格不同,则称该方格为一特殊方格,且称该棋盘为一个特殊棋盘.显然特殊方格在棋盘上出现的位置有4^k种情形.因而对任何k≥0,有4^k种不同的特殊棋盘. 下图–图(1)中的特殊棋盘是当k=3时16个特殊棋盘中的一个:图(1) 题... 阅读全文
posted @ 2015-08-05 11:16 hfcnal 阅读(1635) 评论(0) 推荐(1) 编辑
摘要: Given several segments of line (int the X axis) with coordinates [Li, Ri]. You are to choose the minimal amount of them, such they would completely co... 阅读全文
posted @ 2015-08-05 02:59 hfcnal 阅读(443) 评论(0) 推荐(1) 编辑
摘要: DescriptionThe SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) $ \i... 阅读全文
posted @ 2015-08-04 21:54 hfcnal 阅读(737) 评论(0) 推荐(1) 编辑
摘要: 紫书例题p245Piotr found a magical box in heaven. Its magic power is that if you place any red balloon inside it then, after one hour, it will multiply to ... 阅读全文
posted @ 2015-08-04 20:30 hfcnal 阅读(1168) 评论(0) 推荐(1) 编辑
摘要: UVA - 1605Time Limit:3000MSMemory Limit:Unknown64bit IO Format:%lld & %lluDescriptionThe United Nations has decided to build a new headquarters in Sai... 阅读全文
posted @ 2015-08-04 16:16 hfcnal 阅读(347) 评论(0) 推荐(1) 编辑
摘要: UVA - 120Stacks of FlapjacksTime Limit:3000MSMemory Limit:Unknown64bit IO Format:%lld & %lluDescriptionBackgroundStacks and Queues are often considere... 阅读全文
posted @ 2015-08-04 15:31 hfcnal 阅读(683) 评论(0) 推荐(1) 编辑
摘要: My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F... 阅读全文
posted @ 2015-08-04 11:16 hfcnal 阅读(935) 评论(0) 推荐(1) 编辑
摘要: 归并排序求逆序数Time Limit:7000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uDescriptionIn this problem, you have to analyze a particular sorting algorit... 阅读全文
posted @ 2015-08-03 16:09 hfcnal 阅读(550) 评论(0) 推荐(1) 编辑
摘要: Let us consider sets of positive integers less than or equal to n. Note that all elements of a set are different. Also note that the order of elements... 阅读全文
posted @ 2015-08-02 18:28 hfcnal 阅读(414) 评论(0) 推荐(1) 编辑
摘要: B -BTime Limit:1000MSMemory Limit:16000KB64bit IO Format:%lld & %lluDescriptionExamine the $6\times 6$ checkerboard below and note that the six checke... 阅读全文
posted @ 2015-08-01 16:22 hfcnal 阅读(245) 评论(0) 推荐(1) 编辑
摘要: Time Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uDescriptionAndrewid the Android is a galaxy-famous detective. In his free time he l... 阅读全文
posted @ 2015-08-01 15:00 hfcnal 阅读(894) 评论(0) 推荐(1) 编辑
摘要: HDU 5224 Tom and paper(最小周长)Time Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uDescriptionThere is a piece of paper in front of Tom, it... 阅读全文
posted @ 2015-08-01 14:53 hfcnal 阅读(360) 评论(0) 推荐(1) 编辑
摘要: Equivalent StringsE -暴力求解、DFSTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uDescriptionToday on a lecture about strings Gerald lea... 阅读全文
posted @ 2015-07-30 10:34 hfcnal 阅读(616) 评论(0) 推荐(1) 编辑
摘要: 10976 Fractions AgainIt is easy to see that for every fraction in the form 1 k (k > 0), we can always find two positive integers x and y, x ≥ y, such ... 阅读全文
posted @ 2015-07-29 17:04 hfcnal 阅读(562) 评论(0) 推荐(2) 编辑
摘要: Disease ManangementQ -枚举子集Time Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uDescriptionAlas! A set of D (1 #include#includeu... 阅读全文
posted @ 2015-07-29 15:48 hfcnal 阅读(382) 评论(0) 推荐(1) 编辑
摘要: LeetCode Maximum Product SubarrayDescriptionGiven a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value o... 阅读全文
posted @ 2015-07-28 21:31 hfcnal 阅读(948) 评论(0) 推荐(1) 编辑
摘要: POJ 1321-棋盘问题K - DFSTime Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uDescription在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个... 阅读全文
posted @ 2015-07-28 19:38 hfcnal 阅读(12129) 评论(1) 推荐(3) 编辑