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 ...
随机推荐
- 安装在ubuntu12.04上安装gcc4.8
因为gcc4.8支持最新的c++11标准,所有开始c++11标准系列学习前,请按照gcc4.8,方便边学习边写代码练习. 安装编译好的gcc4.8 sudo add-apt-repository pp ...
- UVa 10400 - Game Show Math 游戏中的数学 dfs+判重
题意:给出一些数字和一个目标数字,要求你在数字间添加+-*/,让表达式能达到目标数字,运算符号的优先级都是一样的. 由于数据量很大,本来想用map<string>判重的,结果还是超时了,然 ...
- 第三篇:GPU 并行编程的运算架构
前言 GPU 是如何实现并行的?它实现的方式较之 CPU 的多线程又有什么分别? 本文将做一个较为细致的分析. GPU 并行计算架构 GPU 并行编程的核心在于线程,一个线程就是程序中的一个单一指令流 ...
- jQuery ajax 传递数组到struts2
使用jQuery的$.ajax()方法进行异步交互时,如果传递的数据有数组(例如传输checkbox数据),Action中经常会接受不到数据. 此时应该注意一下data中数组的写法,例如: //组合成 ...
- JS快速排序和去重
JS的快速排序和JS去重在面试的时候问的挺多的.下面是我对快速排序的理解,和快速排序,去重的代码. 1.什么是快速排序? 第一步: 快速排序就是去个中间值,把比中间值小的放在左边设为arrLeft,比 ...
- 关于Entity Framework 5 从数据库生成模型时没有字段注释的解决方法!
目前用到了EF5进行模型创建,发现从数据库生成过来的实体中并没有包含字段的说明信息(鄙视下微软,这么简单的问题都不给解决下,太粗枝大叶了),网上找到了EFTSQLDocumentation.Gener ...
- Adb工具常用操作(一)
一.启动或关闭server 1.3 Android SDK中的常用命令行工具 在<Android SDK安装目录>\tools目录中带了很多命令行工具.虽然一般的开发人员并不需要完全掌握 ...
- linux,安装软件报错cannot create regular file '/usr/local/man/man1': No such file or directory
make install时报错,如下 install: cannot create regular file '/usr/local/man/man1': No such file or direct ...
- linux创建用户
创建用户 sudo adduser xxx 删除用户 sudo userdel xxx 删除用户和目录 sudo userdel -r xxx
- C#获取类中所有方法
var t = typeof(HomeController); //获取所有方法 System.Reflection.MethodInfo[] methods = t.GetMethods(); // ...