又是只过两水题,不过状态有些回升,也是差点一血.Problem A SPOJ AMR11A 显然的dp?就一抖就想到尝试从(R,C)推到(1,1),正着推的话,只能检查某一种解可不可行(就有人想出了二分+DP的神奇方法。。刚卡过。。不过上界是把所有龙加起来。。不闲麻烦的话。。可以按照贪心的方...
分类:
其他好文 时间:
2014-07-22 08:04:36
阅读次数:
267
这个题目好果的01,只要把每个数乘以100,就能解决下标的问题了
继续贴代码环节(自己的代码好丑啊~~~)
#include
#include
#include
#include
#define maxn 3100000
using namespace std;
int dp[maxn];
int p[31];
int main()
{
double Q;
int n,...
分类:
其他好文 时间:
2014-07-22 00:32:35
阅读次数:
213
XHXJ's LIS
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 755 Accepted Submission(s): 289
Problem Description
#define xhxj (X...
分类:
其他好文 时间:
2014-07-22 00:27:36
阅读次数:
244
虽然很多人说记模板提升空间有限,但是对于我这种菜鸟级别的人来说。能做的也只有记记模板了!
希望这个模板能帮到你,如果有更好的模板记得告诉我哦!!谢谢。
二维代码:
#include
#include
#include
using namespace std;
int n,m,a[505],b[505],dp[505][505];
int LICS()
{
int max,i,j;
mem...
分类:
其他好文 时间:
2014-07-21 11:42:44
阅读次数:
192
px :是屏幕的像素点
in :英寸
mm :毫米
pt :磅,1/72 英寸
dp :一个基于density的抽象单位,如果一个160dpi的屏幕,1dp=1px
dip :等同于dp
sp :同dp相似,但还会根据用户的字体大小偏好来缩放。
建议使用sp作为文本的单位,其它用dip
针对dip和px 的关系,做以下概述:
QVGA屏densi...
分类:
移动开发 时间:
2014-07-21 11:35:04
阅读次数:
251
Problem Description
The professors of the Bayerische Mathematiker Verein have their annual party in the local Biergarten. They are sitting at a round table each with his own pint of beer. As a ceremo...
分类:
其他好文 时间:
2014-07-21 11:31:44
阅读次数:
252
一般情况:
#include
#include
#include
using namespace std;
int a[1005],dp[1005],n;
int LIS()
{
int i,j,ans,m;
dp[1] = 1;
ans = 1;
for(i = 2;i<=n;i++)
{
m = 0;
for(...
分类:
其他好文 时间:
2014-07-21 11:23:15
阅读次数:
185
Problem Description
In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. For example, ...
分类:
其他好文 时间:
2014-07-21 11:13:44
阅读次数:
270
Very classic problem. You can brush up your DP and Searching skills.DP:class Solution {public: int maxSubArray(int A[], int n) { // dp[i + 1...
分类:
其他好文 时间:
2014-07-21 11:06:21
阅读次数:
216
题意是给出某个地鼠的出现位置以及出现时间,人有一个移动速度,求此人最多可以打多少个地鼠?我们根据时间把所有的地鼠排序,如果两个地鼠之间的距离不超过时间只差与速度的乘积,那说明打完上一只地鼠还可以打到这一只地鼠。直接f[i]表示打完第i只地鼠且此时在i地鼠位置的期望,DP即可。召唤代码君:/** th...
分类:
其他好文 时间:
2014-07-21 08:04:50
阅读次数:
221