Browsing History
hdu4464:http://acm.hdu.edu.cn/showproblem.php?pid=4464
题意:就是统计n个字符串中每个字符串每个字符对印的Asci,然后输出最大的长度。
题解:水题,注意一个技巧:字符对应的asci 直接int a=(int )c(c是字符类型即可)。
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
char str[];
int main(){
int tt=,n,ans=,temp;
while(~scanf("%d",&n)){
ans=;
while(n--){
memset(str,,sizeof(str));
scanf("%s",str);
int len=strlen(str);
temp=;
for(int i=;i<len;i++){
temp+=(int)str[i];
}
ans=max(ans,temp);
}
printf("Case %d: %d\n",tt++,ans); }
}
Browsing History的更多相关文章
- HDU 4464 Browsing History(最大ASCII的和)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4464 Problem Description One day when you are going t ...
- What's new in Windows 10 Enterprise with Microsoft Edge.(Windows 10 新功能)
What's new in Windows 10 Enterprise with Microsoft Edge --带有Edge浏览器的Windows 10 企业版的新功能 本文摘录自公司群发邮件, ...
- HTTP协议学习---(九)cookie
Cookie是HTTP协议中非常重要的东西, 之前拜读了Fish Li 写的[细说Cookie], 让我学到了很多东西.Fish的这篇文章写得太经典了. 所以我这篇文章就没有太多内容了. 最近我打算写 ...
- HTTP协议 (七) Cookie
HTTP协议 (七) Cookie Cookie是HTTP协议中非常重要的东西, 之前拜读了Fish Li 写的[细说Cookie], 让我学到了很多东西.Fish的这篇文章写得太经典了. 所以我这篇 ...
- [计算机取证技术] VDI-in-a-Box Analysis Results
原文跳转: http://dig4n6.blogspot.tw/2013/07/vdi-in-box-analysis-results.html *文中引用图片如无法浏览,请科学上网* VDI-in- ...
- 最大ASCII的和问题
问题:One day when you are going to clear all your browsing history, you come up with an idea: You want ...
- Technical analysis of client identification mechanisms
http://www.chromium.org/Home/chromium-security/client-identification-mechanisms Chromium > Chro ...
- 2012 Asia Chengdu Regional Contest
Browsing History http://acm.hdu.edu.cn/showproblem.php?pid=4464 签到 #include<cstdio> #include&l ...
- 【转】Git代码提交最佳实践
GIT Commit Good Practice The following document is based on experience doing code development, bug ...
随机推荐
- 使用WinINet和WinHTTP实现Http訪问
使用WinINet和WinHTTP实现Http訪问 飘飘白云 l_zhaohui@163.com 2007-11-30 Http訪问有两种方式,GET和POST,就编程来说GET方式相对简单点,它不用 ...
- virtualbox 虚拟3台虚拟机搭建hadoop集群
用了这么久的hadoop,只会使用streaming接口跑任务,各种调优还不熟练,自定义inputformat , outputformat, partitioner 还不会写,于是干脆从头开始,自己 ...
- 生成N个不重复的随机数(转)
有25幅作品拿去投票,一次投票需要选16幅,单个作品一次投票只能选择一次.前面有个程序员捅了漏子,忘了把投票入库,有200个用户产生的投票序列为空.那么你会如何填补这个漏子? 当然向上级反映情况.但是 ...
- 编译安装GCC 5.2.0
https://blog.atime.me/note/install-gcc-5.2.0-from-source.html 记录编译GCC 5.2.0时遇到的问题和解决方法,以备日后查询. 平时使用的 ...
- windows下安装redis和php的redis扩展
1.redis简介 redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合).zset(s ...
- hive hbase pig 区别
参考文档http://www.linuxidc.com/Linux/2014-03/98978.htm
- Android开发文摘集合1
作者:张明云 原标题:Android 开发中,有哪些坑需要注意? 作者github主页:zmywly8866.github.io/ 在Android library中不能使用switch-case语句 ...
- java中json转xml
参考:http://heipark.iteye.com/blog/1394844 需要json-lib-2.1-jdk15.jar和xom-1.2.5.jar,maven pom.xml如下: xml ...
- java '相等'的比较.
我们知道对于操作符 "==",如果比较的是原生类型(primitive type),表示的是 '值本身'是否相等;而对于引用类型(reference type),表示的是 '对象的 ...
- Visual Studio 2013 在使用 MVC5 无智能提示
关于 Visual Studio 2013 在使用 MVC5 无智能提示的问题,类库无法正常识别,连最基本的关键字提示都没有了,类变色也没有了,所有的关键字代码,类名,方法成员名都要全部手动敲 原因: ...