当前位置:网站首页>Question G: Word Analysis ← Questions for the second provincial competition of the 11th Blue Bridge Cup Competition
Question G: Word Analysis ← Questions for the second provincial competition of the 11th Blue Bridge Cup Competition
2022-08-03 10:49:00 【hnjzsyjyj】
[Problem Description]
Xiao Lan is learning a magical language, the words in this language are all written in lowercase EnglishMade up of letters, some words are very long, far exceeding the length of normal English words.Xiaolan has been learning for a long time and can't remember some words. He plans to stop memorizing these words completely, but to distinguish words according to which letter in the word appears the most.
Now, please help Xiao Lan. After giving a word, help him find the letter that appears the most and the number of times that letter appears.
[Input Format]
The input line contains one word, and the word consists of lowercase English letters only.
[Output format]
The output consists of two lines, the first line contains an English letter, which indicates which letter appears the largest in the word, if there are multiple letters appearingThe number of times is equal, and the one with the smallest dictionary sequence is output.
[Algorithm Code One]
#include using namespace std;int num[27];int main() {string s;cin>>s;for(int i=0; i
[Algorithm code 2]
#include using namespace std;const int maxn=1005;int num[maxn];int main() {string s;cin>>s;for(int i=0; i
[References]
https://blog.csdn.net/qq_20144897/article/details/122956448
边栏推荐
猜你喜欢
跨域问题的分析
程序员架构修炼之道:如何设计出可持续演进的系统架构?
再谈“雷克萨斯”安全装置失效!安全手册疑点重重,网友:细思极恐
混合型界面:对话式UI的未来
8 月数据库排行榜:Oracle 分数大跌,MySQL 上涨最多
Who is more popular for hybrid products, depending on technology or market?
HCIP第十七天笔记
ECCV2022 | RU&谷歌:用CLIP进行zero-shot目标检测!
集成学习、boosting、bagging、Adaboost、GBDT、随机森林
type=“module“ 你了解,但 type=“importmap“ 你知道吗
随机推荐
SAP 电商云 Spartacus UI 的 External Routes 设计明细
Win10/11 删除文件资源管理器左侧栏目文件夹
分辨率_分辨率越高越好?手机屏幕分辨率多少才合适?现在终于搞清楚了[通俗易懂]
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之二
阿里本地生活全域日志平台 Xlog 的思考与实践
面试官:工作两年了,这么简单的算法题你都不会?
深入解析分布式文件系统的一致性的实现
json格式的字符串是什么类型的_输入字符串的格式要求
QT with OpenGL(HDR)
进入 SQL Client 创建 table 后,在另外一个节点进入 SQL Client 查询不到
Regulation action for one hundred days during the summer, more than 700 traffic safety hidden dangers were thrown out
鸿蒙第三次
Scapy的介绍(一)「建议收藏」
MySQL数据库高级使用
在安装GBase 8c数据库的时候,报错显示“Host ips belong to different cluster”。这是为什么呢?有什么解决办法?
深度学习经典网络 -- Inception系列(稀疏结构)
三大产品力赋能欧萌达OMODA5
关于OPENSSL的问题
成为优秀架构师必备技能:怎样才能画出让所有人赞不绝口的系统架构图?秘诀是什么?快来打开这篇文章看看吧!...
4G采集ModbusTCP转JSON接MQTT云平台