Browsing History

hdu4464:http://acm.hdu.edu.cn/showproblem.php?pid=4464

题意:就是统计n个字符串中每个字符串每个字符对印的Asci,然后输出最大的长度。

题解:水题,注意一个技巧:字符对应的asci 直接int a=(int )c(c是字符类型即可)。

 1 #include<iostream>
 2 #include<cstdio>
 3 #include<cstring>
 4 #include<algorithm>
 5 using namespace std;
 6 char  str[1000];
 7 int main(){
 8    int tt=1,n,ans=0,temp;
 9    while(~scanf("%d",&n)){
10        ans=0;
11     while(n--){
12      memset(str,0,sizeof(str));
13      scanf("%s",str);
14      int len=strlen(str);
15         temp=0;
16      for(int i=0;i<len;i++){
17         temp+=(int)str[i];
18        }
19       ans=max(ans,temp);
20     }
21      printf("Case %d: %d\n",tt++,ans);
22
23    }
24 }

Browsing History

时间: 2024-11-10 14:37:22

Browsing History的相关文章

HDU 4464 Browsing History(最大ASCII的和)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4464 Problem Description One day when you are going to clear all your browsing history, you come up with an idea: You want to figure out what your most valued site is. Every site is given a value which e

Delete Browsing History for IE 1.0

IE11.bat 1 rundll32.exe inetcpl.cpl,ClearMyTracksByProcess Flags: 16640 2 rundll32.exe inetcpl.cpl,ClearMyTracksByProcess Flags: 18939 3 rundll32.exe inetcpl.cpl,ClearMyTracksByProcess Flags: 2304 4 rundll32.exe inetcpl.cpl,ClearMyTracksByProcess Fla

HDU-4464-Browsing History (2012 ACM/ICPC成都现场赛!)

Browsing History Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3065    Accepted Submission(s): 1692 Problem Description One day when you are going to clear all your browsing history, you come

HTTP协议 (七) Cookie

Cookie是HTTP协议中非常重要的东西, 之前拜读了Fish Li 写的[细说Cookie], 让我学到了很多东西.Fish的这篇文章写得太经典了. 所以我这篇文章就没有太多内容了. 最近我打算写一个系列的HTTP文章,我站在HTTP协议的角度, 说说我对Cookie的理解. 阅读目录 Cookie是什么,有什么用,为什么要用到Cookie Cookie的分类 Cookie存在哪里 使用和禁用Cookie Fiddler查看HTTP中的Cookie 网站自动登陆的原理 截获Cookie,冒充

Software List [Windows, Linux, Freebsd, Tools...]

Microsoft 下载管理器: 使用 Microsoft 下载管理器从 Internet下载文件比单独使用浏览器更可靠且速度更快, 支持多线程下载,多语言. http://www.microsoft.com/zh-cn/download/details.aspx?id=27960 Chrome 浏览器(完整包): https://www.google.com/chrome/browser/thankyou.html?standalone=1&platform=win Firefox火狐浏览器:

Technical analysis of client identification mechanisms

http://www.chromium.org/Home/chromium-security/client-identification-mechanisms Chromium‎ > ‎Chromium Security‎ > ‎ Technical analysis of client identification mechanisms Written by Artur Janc <[email protected]> and Michal Zalewski <[email

最大ASCII的和问题

问题:One day when you are going to clear all your browsing history, you come up with an idea: You want to figure out what your most valued site is. Every site is given a value which equals to the sum of ASCII values of all characters in the URL. For ex

AndroidManifest.xml的&lt;uses-permission&gt;节点

参考资料:http://developer.android.com/reference/android/Manifest.permission.htmlhttp://developer.android.com/guide/topics/manifest/uses-permission-element.html <uses-permission>是<manifest>的直接子节点.可以有多个,用于列出该应用所有需要的系统权限,否则应用中需要相关权限的地方将无法正常运行.应用在安装的时

c#/ASP.NET操作cookie(读写)代码示例

Cookie是存在硬盘上,IE存cookie的地方和Firefox存cookie的地方不一样.不同的操作系统也可能存cookie的地方不一样. 不同的浏览器会在各自的独立空间存放Cookie, 互不干涉以我的windows7, IE8为例,  cookie存在这: C:\Users\xiaoj\AppData\Local\Microsoft\Windows\Temporary Internet Files 注意: 缓存文件和cookie文件,是存在一起的, 都在这个目录下. 你也可以这样找, 打