ural 1723 Sandro's Book
http://acm.timus.ru/problem.aspx?space=1&num=1723
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std; int main()
{
char s1[];
cin>>s1;
int k=strlen(s1);
int b[];
memset(b,,sizeof(b));
for(int i=; i<k; i++)
{
b[s1[i]-'a']++;
}
int c;
int max1=;
for(int i=; i<; i++)
{
if(b[i]>max1)
{
max1=b[i];
c=i;
}
}
printf("%c\n",(c+'a'));
return ;
}
ural 1723 Sandro's Book的更多相关文章
- 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...
- ural 2071. Juice Cocktails
2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...
- ural 2073. Log Files
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...
- ural 2070. Interesting Numbers
2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate int ...
- ural 2069. Hard Rock
2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock ...
- ural 2068. Game of Nuts
2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in proces ...
- ural 2067. Friends and Berries
2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. ...
- ural 2066. Simple Expression
2066. Simple Expression Time limit: 1.0 secondMemory limit: 64 MB You probably know that Alex is a v ...
- ural 2065. Different Sums
2065. Different Sums Time limit: 1.0 secondMemory limit: 64 MB Alex is a very serious mathematician ...
随机推荐
- Appium 环境搭建
1.安装nodejs 下载地址: http://nodejs.org/download/ 下载之后一路next就好. 验证是否安装成功: node -v
- 利用"NOTIFYICONDATA"实现MFC的托盘程序
本文章为转发百度空间内容,,保存一下,以防以后用到.. 一.自定义信息 在头文件中加入下面这句话: #define WM_SHOWTASK (WM_USER+1) 二.MYDLG.CPP文件中添加_m ...
- SpriteKit游戏开发
http://blog.csdn.net/larrysai/article/category/1663301 http://blog.csdn.net/ping_yun_long/article/de ...
- ViewPage 一次滑动多页
效果 size是3的倍数时 其他情况下 初始化 private List<HonerUserBean> anchorList; private ViewPager vp ...
- img图片元素下多余空白解决方案
在进行页面的DIV+CSS排版时,遇到IE6(当然有时Firefox下也会偶遇)浏览器中的图片元素img下出现多余空白的问题绝对是常见的对於 该问题的解决方法也是「见机行事」,根据原因的不同要用不同的 ...
- bootstrap初探
bootstrap资源 http://getbootstrap.com http://github.com/twbs http://www.bootcss.com bootstrap栅格系统 容器:流 ...
- JAVA彩色图片变灰处理
File file = new File("F:/firefox.png"); File destFile = new File("F:/pic/" + Sys ...
- mysql怎么限制某些查询语句的执行?
mysql怎么限制某些查询语句的执行? 比如某些sql语句执行时间很长,超过10s,怎么样超过10s就不让其执行? 后续更新中...
- Android Translate 动画跳跃和缓慢移动
1.动画跳跃:在动画结束的时候设置位置 Animation.AnimationListener listener = new Animation.AnimationListener() { @Over ...
- 怎样取得数组对象和arralist 的长度
数组用length属性 ArrayList用size()方法