给定一个数串,以及K,求对这个数串K划分的乘积最大值。DP思路:一开始肯定想到的是递归,假设在某两个字符间有一个乘号,那么乘积最大就是乘号两边的区间接着划分的乘积最大值。于是状态空间表示如下dp[i][k]表示从0~i之间有K个乘号的乘积最大值,dp[i][k] = max(dp[j][k-1]*n...
分类:
其他好文 时间:
2014-06-14 18:17:56
阅读次数:
292
有关Model: namespace MvcApplication1.Models{ public class Coach { public int Id { get; set; } public string Name { get; set; } }}HomeController中,借助GridV...
分类:
Web程序 时间:
2014-06-14 12:38:09
阅读次数:
200
Problem Description
give you a string, please output the result of the following function mod 1000000007
n is the length of the string
f() is the function of fibonacci, f(0) = 0, f(1) = 1...
a...
分类:
其他好文 时间:
2014-06-14 11:45:49
阅读次数:
243
进入vi的命令 vi filename :打开或新建文件,并将光标置于第一行首 vi +n filename :打开文件,并将光标置于第n行首 vi + filename :打开文件,并将光标置于最后一行首 vi +/pattern filename:打开文件,并将光标置于第一个与pattern匹配...
分类:
系统相关 时间:
2014-06-14 11:41:42
阅读次数:
288
Extjs 在实现消息框的时候,完全摈弃了传统的风格,不再弹出新的对话框,而是在当前页面跳出一个层,并将原页面完整覆盖。原来,只是一种模拟。在 Ext 中,定义了一个类MessageBox,该类还有一个更精简的名字Msg,所有消息框都定义在该类中。 建立dialogs.js文件。 提示框(Alert) 提示框的语法:Ext.MessageBox. alert ( String t...
分类:
Web程序 时间:
2014-06-14 11:30:20
阅读次数:
373
#include
#include
using namespace std;
#define read(x) scanf("%lld",&x)
int main()
{
priority_queue,greater >q;
long long n,temp,sum;
read(n);
if(n==1)
{
read(temp);
printf("%lld\n",temp);
...
分类:
其他好文 时间:
2014-06-14 10:34:12
阅读次数:
223
1、继承Thread类,实现run方法
class TestThread
{
public static void main(String[] args)
{
Thread1 t1=new Thread1();
t1.start();
int index=0;
while(true)
{
if(index++==500)
{
t1.stopThread...
分类:
编程语言 时间:
2014-06-14 10:25:58
阅读次数:
317
1 private string PostData(string url, string postData) 2 { 3 ASCIIEncoding encoding = new ASCIIEncoding(); 4 byte[] data = encoding.GetBytes(...
分类:
其他好文 时间:
2014-06-14 08:49:25
阅读次数:
298
判断一个字符串是否是正确的Email地址:IsEmail.在string的类型定义时添加这个方法不也行吗?正式因为微软没有提供这个方法,咱们才需要给它“增加”IsEmail“方法。StringHelper类上标注static变成静态类,方法是静态方法--------------由于静态类不能new,...
分类:
其他好文 时间:
2014-06-14 08:26:45
阅读次数:
287