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 ...
随机推荐
- WSDL相关文档
http://msdn.microsoft.com/en-us/library/ms996486.aspx http://msdn.microsoft.com/en-us/library/aa4685 ...
- HTTP报头详解
HTTP头字段包括4类: general-header ; 通用报头 request-header ; 请求报头 response-header ; 响应报头 ...
- vuforia 结合 unity3d 开发 AR 的 androidAPP 总结
原地址:https://software.intel.com/zh-cn/blogs/2014/07/09/vuforia-unity3d-ar-androidapp/?utm_campaign=CS ...
- c#比较器 排序
原地址:http://blog.csdn.net/xutao_ustc/article/details/6314057 class Program { static void Main(string[ ...
- Sqli-labs less 47
Less-47 本关的sql语句为 $sql = "SELECT * FROM users ORDER BY '$id'"; 将id变为字符型,因此根据我们上述提到的知识,我 ...
- APM 终端用户体验监控分析(上)
一.前言 理解用户体验是从终端用户角度了解应用交付质量的关键,这是考量业务健康运转的潜在因素.捕获此类数据的方法各种各样,具体的实现途径由应用.基础设施架构以及管理者和管理过程决定. 二.终端用户监控 ...
- Android开发者:你真的会用AsyncTask吗?
[导读]在Android应用开发的过程中,我们需要时刻注意保证应用程序的稳定和UI操作响应及时,因为不稳定或响应缓慢的应用将给应用带来不好的印象,严重的用户卸载你的APP,这样你的努力就没有体现的价值 ...
- 从xml文件中读取注释
void Main() { string dirp=@"E:\Cread\UP4201308.bak\UP4.BAK\ExportPath\ConfigFile\"; ...
- Es使用。
http://jingyan.baidu.com/article/3052f5a1e8a06397f31f8699.html --------------------------- http://el ...
- Visual Studio 项目中添加include, lib, dll库文件(*.h,*.lib,*.dll)
应用程序使用外部库时需要进行加载,两种库的加载本质上都是一样:提供功能和功能的定义.vs2005 c++ 项目设置外部库方法如下: 1. 添加编译所需要(依赖)的 lib 文件 在“项目-&g ...