Treasure Hunt I
Time Limit: 2 Seconds Memory Limit: 65536 KB
Akiba is a dangerous country since a bloodsucker living there. Sometimes the bloodsucker will appear and kill everyone who isn't...
分类:
其他好文 时间:
2014-08-14 10:49:38
阅读次数:
266
Problem
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whole array. The sum of a rectangle...
分类:
其他好文 时间:
2014-08-14 01:35:57
阅读次数:
228
Red and BlackTime Limit:1000MSMemory Limit:30000KTotal Submissions:22409Accepted:12100DescriptionThere is a rectangular room, covered with square tile...
分类:
其他好文 时间:
2014-08-13 22:04:17
阅读次数:
266
Gnome TetravexTime Limit:10 Seconds Memory Limit:32768 KBHart is engaged in playing an interesting game, Gnome Tetravex, these days. In the game, at t...
分类:
其他好文 时间:
2014-08-13 18:40:46
阅读次数:
228
------------------------------------------------------------以此题警告自己:总结,1.在数组的使用时,一定别忘了初始化2.在两种情况复制代码时,一定要小心,注意修改变量名,一不留神就会带来不可估量的后果,一定要仔细挨着一个一个变量的修改,别...
分类:
其他好文 时间:
2014-08-13 13:00:56
阅读次数:
187
/*坑啊,pe的程序在zoj上原来是wa。
题目大意:一个屌丝给m个女神拍照,计划拍照n天,每一天屌丝最多个C个女神拍照,每天拍照数不能超过D张,而且给每个女神i拍照有数量限制[Li,Ri],
对于每个女神n天的拍照总和不能超过Gi,如果有解求屌丝最多能拍多少张照,并求每天给对应女神拍多少张照;否则输出-1。
解题思路:增设一源点st,汇点sd,st到第i天连一条上界为Di下界为0的边,每个女神到...
分类:
其他好文 时间:
2014-08-12 22:14:54
阅读次数:
299
#include #include #define N 1005using namespace std ;char s1[N],s2[N];int dp[N][N],ans,len1,len2;int max(int a,int b){ return a>b ? a : b ; }int f(in....
分类:
其他好文 时间:
2014-08-12 21:29:24
阅读次数:
175
#include #include #define N 1005using namespace std ;char s1[N],s2[N];int dp[N][N],ans,len1,len2;int max(int a,int b){ return a>b ? a : b ; }int f(in....
分类:
其他好文 时间:
2014-08-12 21:29:14
阅读次数:
219
ZOJ 1027/*zoj 1027 poj 1080 思路: 三种状态,取最大值:s1[i]和s2[j]配 :dp[i-1][j-1]+cost[my[s1[i]]][my[s2[j]]];s1[i]和'-' 配: dp[i-1][j]+cost[my[s1[i]]][my['-']];s2[.....
分类:
其他好文 时间:
2014-08-12 21:22:36
阅读次数:
179
zoj 1733#include #include #define N 1005using namespace std ;char s1[N],s2[N];int dp[N][N];int max(int a,int b){ return a>b ? a : b ; }void f(int...
分类:
其他好文 时间:
2014-08-12 21:18:44
阅读次数:
216