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 企业版的新功能 本文摘录自公司群发邮件, ...
随机推荐
- OpenCV学习 7:图像形态学:腐蚀、膨胀
原创文章,欢迎转载,转载请注明出处 首先什么是图像形态学?额,这个抄下百度到的答案.基本思想: 用具有一定形态的结构元素去度量和提取图像中的对应形状已达到对图像分析和识别的目的,形态学图像处理表 ...
- sketch 跟随鼠标指针移动的特效
演示地址:http://www.ke01.com/yanshi/sucai/20140830/2/ 下载地址:https://yunpan.cn/cqgWeIYPer8eC 访问密码 672b
- 解密电子书之一:电子墨水(eink)
今日,关于电子书的话题不断,先是盛大抖了个攒,测试/定价/赔钱的营销策略引来多方质疑.而后汉王又抛出个8寸/800MHz/ARM A8的指标产品大打性能牌. 身为电子行业网站,与非网在时尚数码热潮面前 ...
- delphi中覆盖最大化消息(WM_GETMINMAXINFO)
unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; ...
- docker 数据映射方案
docker run -itd -v /data/:/data1 centos bash // -v 用来指定挂载目录, :前面的/data为本地目录,:后面的/data1 为容器里的目录: dock ...
- Unix/Linux环境C编程入门教程(2) CentOS环境搭建
Unix/Linux版本众多,我们推荐Unix/Linux初学者选用几款典型的Unix/Linux操作系统进行学习. 本文就带大家来安装CentOS并且配置好C/C++开发环境,这是一款Linux. ...
- [LeetCode][Python]16: 3Sum Closest
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com' 16: 3Sum Closesthttps://oj.leetcode.com ...
- maintenance ShellScripts
1.Linux挂载Winodws共享文件夹 2.查看http的并发请求数及其TCP连接状态: 3.用tcpdump嗅探80端口的访问看看谁最高 4.统计/var/log/下文件个数 5.查看当前系统每 ...
- saiku中默认级别all的国际化
在制作saiku的schema文件的时候,当你选择层次的属性hasAll为true的时候,系统默认会为你的层次添加一个“(all)”级别,你无法给它增加一个caption属性来国际化它,因为他不是你创 ...
- 初识Maven
今天开始学习怎样使用maven,听起来挺神奇的东西,我们来一步一步的加以剖析. Maven的一些具体的论文的东西,网上很多博客介绍,这里我就不逐一介绍,下面我们从安装maven开始讲解: (1)Mav ...