标签:blog http io os ar for sp 2014 on
http://acm.hdu.edu.cn/showproblem.php?pid=4464
现场赛总会有水题,这就是最水的一道,估计也就是能当高校的上机题,保研用,呵呵~~~
#include <cstdio> #include <cstring> #include <iostream> using namespace std; #define ll long long const int MAXN= 100+20; char s[MAXN]; int main() { int n; int ic=0; while(~scanf("%d",&n)) { ll ans=0; for(int i=0;i<n;i++) { ll ret=0; scanf("%s",s); int len=strlen(s); for(int j=0;j<len;j++) { if(s[i]=='.')ret+=46LL; else ret+=(ll)s[j]; } ans=max(ans,ret); } printf("Case %d: %I64d\n",++ic,ans); } return 0; }
标签:blog http io os ar for sp 2014 on
原文地址:http://blog.csdn.net/u011026968/article/details/40198655