1410

dp水题 题意读了好一会 是不能连续读两个及以上单词

 #include <iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<stdlib.h>
#include<vector>
#include<queue>
#include<cmath>
using namespace std;
#define N 10010
int dp[N],len[N];
char s[N][],ss[N*];
int main()
{
int i,g=;
while(scanf("%c",&ss[g])!=EOF)
{
g++;
}
int t = ,o=;
for(i = ; i < g ; i++)
{
if((ss[i]>='a'&&ss[i]<='z')||(ss[i]>='A'&&ss[i]<='Z'))
{
s[o][t++] = ss[i];
}
else
{
if(t)
{
s[o][t] = '\0';
len[o] = t;
t = ;o++;
}
}
}
if(t)
{
s[o][t] = '\0';
len[o] = t;
t = ;o++;
}
for(i = ; i < o ; i++)
{
dp[i] = max(dp[i-],dp[i-]+len[i]);
}
cout<<dp[o-]<<endl;
return ;
}

URAL1410. Crack的更多相关文章

  1. reversing-Easy Crack

    Easy Crack 程序启动后输入任意字符会显示一个MessageBox的Incorrect Password. 打开OllyDbg,载入程序后查找到目标字符串Incorrect Password, ...

  2. crack.vbs病毒,优盘里所有文件全变成快捷方式

    去了一趟学校打印店,用优盘copy打印了点东西,当时在打印店电脑里打开优盘的时候里面就变成了快捷方式,但没怎么在意.回来之后在自己电脑上居然也这样了.网上一搜是中了crack.vbs病毒了.格式化优盘 ...

  3. MATLAB的crack安装小曲

    MATLAB的crack安装小曲 本学期要学数学模型和数值分析,需要用MATLAB,便琢磨着装MATLAB.我同专业的同学会装MATLAB的crack,他是数学协会的理事长,平时爱吹牛,问他一个简单的 ...

  4. sdut 2165:Crack Mathmen(第二届山东省省赛原题,数论)

    Crack Mathmen Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述  Since mathmen take securit ...

  5. MITM to crack Https connections

    Everybody knows that https is http over SSL, and https is a secure way for protecting confidential d ...

  6. CentOS下modelsim 10.2c install & crack

    install: 1. install is easy to all : run install.linux 2 crack: this section is important: a. instal ...

  7. Sdut 2165 Crack Mathmen(数论)(山东省ACM第二届省赛E 题)

    Crack Mathmen TimeLimit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Since mathmen take security ...

  8. Xamarin最新crack 包含IOS

    Xamarin.Android 4.10.01068 & Xamarin.iOS 1.8.361 28 Comments   tweet     inShare   NEW support f ...

  9. Xamarin Crack

    Inspired by http://www.cnblogs.com/portal/p/4666252.html#undefined To 'crack' VS Xamarin, take VS201 ...

随机推荐

  1. 研究AFIncrementalStore

    一.增量存贮(AFIncrementalStore:NSIncrementalStore)在CoreData中所处位置

  2. 100个经典的C算法

    1.题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔 子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数 为多少? #include<stdio.h&g ...

  3. spark分片个数的确定及Spark内存错误(GC error)的迂回解决方式

    我们知道,spark中每个分片都代表着一部分数据,那么分片数量如何被确认的呢? 首先我们使用最常见的HDFS+Spark,sparkDeploy的方式来讨论,spark读取HDFS数据使用的是spar ...

  4. 解决vsftpd日志时间问题

    解决vsftpd日志时间问题 发布时间:August 29, 2008 分类:Linux <你必须承认土也是一种艺术> <Linux下查看Apache的请求数> 最近发现vsf ...

  5. Google NACL 简介

    Back to README Getting Started This page tells you how to install Native Client and run demos, both ...

  6. android开发环境搭建(for 驱动开发人员)

    前言 一.android驱动的开发流程 1: 写LINUX驱动 2: 写LINUX应用测试程序 3: 写JNI接口,用来包装第二步写的应用 (要用NDK来编译) 生成一个.SO文件,相当于CE下的DL ...

  7. Windows 代码实现关机(直接黑屏)

    整理资料的时候发现的以前的代码,本机Win7 x64 Sp1 运行直接关机,黑屏.就是利用RtlAdjustPrivilege函数提权,代码中的注释写的很详细了.用的VS2010写的,直接编译成x64 ...

  8. UML类图、接口、包、关系

    一.类图:允许我们去标记静态内容及类之间的关系. 类的基本表示法: 名称 属性(类型,可见性) 方法(参数,返回值)  tip: 显示可见性:Options->Show Visibility 显 ...

  9. ssh超时断开的解决方法

    当用SSH Secure Shell连接Linux时,如果几分钟没有任何操作,连接就会断开,必须重新登陆才行,每次都重复相同的操作,很是烦人,本文总结了两种解决的方法. 方法1:更改ssh服务器的配置 ...

  10. C++ std命名空间

    1.命名空间是一种特殊的作用域,它包含了处于该作用域中所有标示符.命名空间使用namespace 来声明,并使用{}来界定命名空间的作用域,例如: namespace func{ int val=0; ...