HDU 4464 Browsing History(最大ASCII的和)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4464
has value of 438 because 438 = 97 + 97 + 46 + 99 + 99. You just need to print the largest value amongst all values of sites.
Things are simplified because you found that all entries in your browsing history are of the following format: [domain], where [domain] consists of lower-case Latin letters and “.” only. See the sample input for more details.
For each test case, the first line contains an integer n (1 ≤ n ≤ 100), the number of entries in your browsing history.
Then follows n lines, each consisting of one URL whose length will not exceed 100.
Input is terminated by EOF.
1
aa.cc
2
www.google.com
www.wikipedia.org
Case 1: 438
Case 2: 1728
题意:
求最大的ASCII的和!
代码例如以下:
#include <cstdio>
#include <cstring>
int main()
{
int cas = 0;
int n;
char s[117];
while(~scanf("%d",&n))
{
getchar();
int maxx = 0;
int sum = 0;
for(int i = 0; i < n; i++)
{
gets(s);
sum = 0;
int len = strlen(s);
for(int j = 0; j < len; j++)
{
sum += s[j];
}
if(sum > maxx)
maxx = sum;
}
printf("Case %d: %d\n",++cas,maxx);
}
return 0;
}
HDU 4464 Browsing History(最大ASCII的和)的更多相关文章
- Browsing History
hdu4464:http://acm.hdu.edu.cn/showproblem.php?pid=4464 题意:就是统计n个字符串中每个字符串每个字符对印的Asci,然后输出最大的长度. 题解:水 ...
- hdu 4464 水
http://acm.hdu.edu.cn/showproblem.php?pid=4464 现场赛总会有水题,这就是最水的一道,预计也就是能当高校的上机题,保研用,呵呵~~~ #include &l ...
- 【HDU - 4342】History repeat itself(数学)
BUPT2017 wintertraining(15) #8C 题意 求第n(n<2^32)个非完全平方数m,以及\(\sum_{i=1}^m{\lfloor\sqrt i\rfloor}\) ...
- 最大ASCII的和问题
问题:One day when you are going to clear all your browsing history, you come up with an idea: You want ...
- man ascii
Linux 2.6 - man page for ascii (linux section 7) - Unix & Linux Commands Linux 2.6 - man page fo ...
- ASCII 码对应表
Macron symbol ASCII CODE 238 : HTML entity : [ Home ][ español ] What is my IP address ? your public ...
- 2012 Asia Chengdu Regional Contest
Browsing History http://acm.hdu.edu.cn/showproblem.php?pid=4464 签到 #include<cstdio> #include&l ...
- A Secure Cookie Protocol 安全cookie协议 配置服务器Cookie
Title http://www.cse.msu.edu/~alexliu/publications/Cookie/cookie.pdf AbstractCookies are the primary ...
- 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 企业版的新功能 本文摘录自公司群发邮件, ...
随机推荐
- HTML5 canvas易错点
一.画布的默认宽高 <canvas id="myCanvas" style="border:1px solid black;"> 你的浏览器不支持h ...
- Wafer管芯数量及成本估算
芯片流片费用一般不按颗数计价,现在流片主要分为全晶圆和MPW两种方式. MPW是现在很流行的一种tapout方法,主要是按晶圆面积来均分价格. 如果是整个wafer的话,成本主要是wafer费 ...
- ARM Cortex-M3内核的巨大优势
ARM Cortex-M3相比于ARM其他系列微控制器,具有以下优势或特点: 1. 三级流水线+分支预测 ARM Cortex-M3与ARM7内核一样,采用适合于微控制器应用的三级流水线,但增加了分支 ...
- MyBatis 最常见错误,启动时控制台无限输出日志
你是否遇到过下面的情况,控制台无限的输出下面的日志: Logging initialized using ‘class org.apache.ibatis.logging.log4j.Log4jImp ...
- uvalive5818 uva12376 As Long as I Learn, I Live
题意:给出一个又向图每个图有权值和编号(正方形里的是编号),从第0号节点开始每次向当前节点所连的点中权值最大的节点移动(不会存在权值相同的节点),问最后所在的节点编号和经过的节点的权值之和. 解:模拟 ...
- Strange Towers of Hanoi
题目链接:http://sfxb.openjudge.cn/dongtaiguihua/E/ 题目描述:4个柱子的汉诺塔,求盘子个数n从1到12时,从A移到D所需的最大次数.限制条件和三个柱子的汉诺塔 ...
- 整理Linux查看系统日志的一些经常使用命令
整理Linux查看系统日志的一些经常使用命令 last -a 把从何处登入系统的主机名称或ip地址,显示在最后一行. -d 指定记录文件.指定记录文件.将IP地址转换成主机名称. -f <记录文 ...
- 全互联结构DVPN综合配置示例
以下内容摘自正在全面热销的最新网络设备图书“豪华四件套”之一<H3C路由器配置与管理完全手册>(第二版)(其余三本分别是:<Cisco交换机配置与管理完全手册>(第二版).&l ...
- text选中后displa出label内容
效果很好而且很简单 用text的click属性即可 private sub text1_click()label1.caption="******"label2.caption=& ...
- myeclipse破解教程,对所有版本有效,完美支持32位和64位
破解软件下载地址 执行Run.bat文件,按照以下步骤进行激活: 第一步:输入任意用户名 第二步:点击Systemid... 按钮,自动生成本机器的systemid. 第三步:点菜单Tools-> ...