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 企业版的新功能 本文摘录自公司群发邮件, ...
随机推荐
- 安装虚拟机VMWare时出现1021错误的解决办法
今天安装虚拟机(VMWare Workstation9.0),中途老是出现错误:Failed to create the requested registry key key installer er ...
- 关于require,require_once,include和include_once的区别
一.定义 require,require_once,include,include_once都属于PHP的关键字,也就是说它们实际都是PHP的语句,而不是函数,类似于print,echo一样,也是PH ...
- erlang学习笔记(2)
函数%###geometry.erl###-module(geometry). 定义-export([area/1, function1/2, function2/0, ...]).area({rec ...
- MVC4,MVC3,VS2012+ entity framework Migration from Sqlserver to Mysql
在开发的初期个人认为因VS与Sqlserver的配合很默契,即可以方便的实现Code First,又可以使用SqlServer Manager很漂亮的进行建模与变更,也许是个人的使用习惯MS的界面做的 ...
- WPF中的触发器简单总结
原文 http://blog.sina.com.cn/s/blog_5f2ed5cb0100p3ab.html 触发器,从某种意义上来说它也是一种Style,因为它包含有一个Setter集合,并根据一 ...
- Exec sql/c
Exec sql/c 利用高级语言的过程性结构来弥补SQL语言实现复杂应用方面的不足. 嵌入SQL的高级语言称为主语言或宿主语言. 在混合编程中,SQL语句负责操作数据库,高级语言语句负责控制程序流程 ...
- XmlSerializer
XmlSerializer作用是将对象序列化到 XML 文档中和从 XML 文档中反序列化对象.XmlSerializer 使您得以控制如何将对象编码到 XML 中. 所在的命名空间:System.X ...
- 学习ExtjsForVs(第一个案例HelloWord)
第一个案例-Hello Word 1.本次练习以ext-4.0.7为例,首先从网上下载ext包. 2.打开包后将里面的三个文件或文件夹拷贝到项目中. resource文件夹 bootstrap.js ...
- 2014.9.16HTML表单CSS
(一)表格 合并单元格(少用) (合并列) 1.先选中要合并的2个或多个单元格,然后点击以下图标 代码:<td colspan="2"> </td> 2.设 ...
- 正整数从1到N,输出按照字典序排序的前K个数
#include <iostream> #include <cassert> using namespace std; ; char a[max_len]; void topK ...