摘要: 给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。 Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0<m,n<1000 AND 0<x<=m AND 0<y<=n),表示给定的矩形有m行n列。接下来这个 阅读全文
posted @ 2017-04-22 17:28 happy_codes 阅读(164) 评论(0) 推荐(0) 编辑
摘要: hdu 1506 A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have di 阅读全文
posted @ 2017-04-22 17:21 happy_codes 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in whi 阅读全文
posted @ 2017-04-22 17:09 happy_codes 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Zipper Zipper Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. T 阅读全文
posted @ 2017-04-22 16:58 happy_codes 阅读(182) 评论(0) 推荐(0) 编辑
摘要: QQpet exploratory park QQpet exploratory park Today, more and more people begin to raise a QQpet. You can get a lot of pleasure from it, although it d 阅读全文
posted @ 2017-04-22 16:46 happy_codes 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 漫步校园 LL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实 阅读全文
posted @ 2017-04-22 16:37 happy_codes 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 平衡树 平衡树 神奇的cxlove有一颗平衡树,其树之神奇无法用语言来描述 OrzOrz。 这棵树支持3种操作: 1、加入一个数到树中,维护平衡树的合法性; 2、给一个数X,用O(1)的时间求出来树中的数Y使得 Y ^ X 最大(异或操作, Pascal 写作 xor , 0 ^ 0 = 0 , 1 阅读全文
posted @ 2017-04-22 16:27 happy_codes 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 哥德巴赫猜想认为“每一个大于2的偶数,都能表示成两个质数之和”。 给定一个大于2的偶数N,你能找到两个质数P和Q满足P<=Q并且P+Q=N吗? Input 一个偶数N(4 <= N <= 1000000) Output 输出P和Q。如果有多组解,输出P最小的一组。 Sample Input Samp 阅读全文
posted @ 2017-04-22 16:24 happy_codes 阅读(162) 评论(0) 推荐(0) 编辑
摘要: What is possibility of rolling N dice and the sum of the numbers equals to M? Input Two integers N and M. (1 ≤ N ≤ 100, 1 ≤ M ≤ 600) Output Output the 阅读全文
posted @ 2017-04-22 16:21 happy_codes 阅读(105) 评论(0) 推荐(0) 编辑
摘要: HDU 1712 Problem Description ACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from diffe 阅读全文
posted @ 2017-04-22 16:19 happy_codes 阅读(155) 评论(0) 推荐(0) 编辑