URAL1410. Crack
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的更多相关文章
- reversing-Easy Crack
Easy Crack 程序启动后输入任意字符会显示一个MessageBox的Incorrect Password. 打开OllyDbg,载入程序后查找到目标字符串Incorrect Password, ...
- crack.vbs病毒,优盘里所有文件全变成快捷方式
去了一趟学校打印店,用优盘copy打印了点东西,当时在打印店电脑里打开优盘的时候里面就变成了快捷方式,但没怎么在意.回来之后在自己电脑上居然也这样了.网上一搜是中了crack.vbs病毒了.格式化优盘 ...
- MATLAB的crack安装小曲
MATLAB的crack安装小曲 本学期要学数学模型和数值分析,需要用MATLAB,便琢磨着装MATLAB.我同专业的同学会装MATLAB的crack,他是数学协会的理事长,平时爱吹牛,问他一个简单的 ...
- sdut 2165:Crack Mathmen(第二届山东省省赛原题,数论)
Crack Mathmen Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 Since mathmen take securit ...
- MITM to crack Https connections
Everybody knows that https is http over SSL, and https is a secure way for protecting confidential d ...
- CentOS下modelsim 10.2c install & crack
install: 1. install is easy to all : run install.linux 2 crack: this section is important: a. instal ...
- Sdut 2165 Crack Mathmen(数论)(山东省ACM第二届省赛E 题)
Crack Mathmen TimeLimit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 Since mathmen take security ...
- Xamarin最新crack 包含IOS
Xamarin.Android 4.10.01068 & Xamarin.iOS 1.8.361 28 Comments tweet inShare NEW support f ...
- Xamarin Crack
Inspired by http://www.cnblogs.com/portal/p/4666252.html#undefined To 'crack' VS Xamarin, take VS201 ...
随机推荐
- sample a texture as a rendertarget
ID3D11DeviceContext::PSSetShaderResources: Resource being set to PS shader resource slot 0 is still ...
- 研究AFIncrementalStore
一.增量存贮(AFIncrementalStore:NSIncrementalStore)在CoreData中所处位置
- Eclipse新版 syso无法自动补全的解决方法
症状: 以前输入Syso可以直接自动转化为System.out.println(""); 现如今居然还要让我手动选择一下才可以! 我仔细看了一下Eclipse的插件,发现是新版Ec ...
- sencha Touch 2.4 学习之 XTemplate模板
XTemplate模板 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> & ...
- DSP中常用的C语言关键字
const Ø使用:const 数据类型 变量名: Ø作用:优化存储器的分配,表示变量的内容是常数,不会改变. Ø举例:const char tab[1024]={显示数据}; volatile(易变 ...
- AD转换后数字量的处理
假设模拟输入电压的最大值为5V,A/D转换器件为8位转换. [该转换器的分辨率为1/2n=0.3906%.] [能分辨输入模拟电压变化的最小值为5*0.3906%=19.5mv.] 则模拟电压与数字输 ...
- UML基本表示法(转载)
UML是流行的图解符号.我们都知道,UML是可视化,说明,构建和记录软件和非软件系统的组成部分.这里的可视化是最重要的部分,需要被理解和记忆. UML符号是最重要的建模元素.适当有效地使用符号是非常重 ...
- VS调试Libevent流程
下载源码包: libevent--stable.tar.gz 第一:编译libevent 进入VS2010命令提示,切换到libevent的所在目录 nmake /f Makefile.nmake 编 ...
- poj 2187
求凸包后枚举凸包上的点 #include <cstdio> #include <cstdlib> #include <cmath> #include <map ...
- JQuery的ajax方法
1.使用方式: 由于是全局方法,所以调用简单:$.ajax(); 2.可输入参数: 最好是写成一个json形式,个人不建议用链式,那样看上去不太好. 参数名称 类型 描述 dataType strin ...