当前位置: 首页 > news >正文

淄博网站建设找李光明怎么出售友情链接

淄博网站建设找李光明,怎么出售友情链接,最新永久x8最新人口,安卓 网站整站下载CF43A Football 题解题目链接字面描述题面翻译题面描述题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1样例 #2样例输入 #2样例输出 #2代码实现题目 链接 https://www.luogu.com.cn/problem/CF43A 字面描述 题面翻译 题面描述 两只足球队比赛,现给你进…

CF43A Football 题解

  • 题目
    • 链接
    • 字面描述
      • 题面翻译
        • 题面描述
      • 题目描述
      • 输入格式
      • 输出格式
      • 样例 #1
        • 样例输入 #1
        • 样例输出 #1
      • 样例 #2
        • 样例输入 #2
        • 样例输出 #2
  • 代码实现

题目

链接

https://www.luogu.com.cn/problem/CF43A

字面描述

题面翻译

题面描述

两只足球队比赛,现给你进球情况,问哪支队伍赢了。

第一行一个整数 nnn1≤n≤1001\leq n\leq 1001n100),表示有 nnn 次进球,接下来 nnn 行,每行一个长度不超过 101010,只由大写字母组成的字符串,表示一个进球的球队名,保证只有两个球队。

输出一个字符串表示胜利球队的球队名,不会平局。

题目描述

One day Vasya decided to have a look at the results of Berland 1910 Football Championship’s finals. Unfortunately he didn’t find the overall score of the match; however, he got hold of a profound description of the match’s process. On the whole there are $ n $ lines in that description each of which described one goal. Every goal was marked with the name of the team that had scored it. Help Vasya, learn the name of the team that won the finals. It is guaranteed that the match did not end in a tie.

输入格式

The first line contains an integer $ n $ ( $ 1<=n<=100 $ ) — the number of lines in the description. Then follow $ n $ lines — for each goal the names of the teams that scored it. The names are non-empty lines consisting of uppercase Latin letters whose lengths do not exceed 10 symbols. It is guaranteed that the match did not end in a tie and the description contains no more than two different teams.

输出格式

Print the name of the winning team. We remind you that in football the team that scores more goals is considered the winner.

样例 #1

样例输入 #1

1
ABC

样例输出 #1

ABC

样例 #2

样例输入 #2

5
A
ABA
ABA
A
A

样例输出 #2

A

代码实现

map的一道基础操作模板题,(稍后会写map的数据结构介绍)

#include<bits/stdc++.h>
using namespace std;int t,cnt;
string a,ans;
map<string,int>mp;
map<string,int>::iterator it;
int main(){cin>>t;while(t--){cin>>a;mp[a]++;}for(it=mp.begin();it!=mp.end();it++){if(it->second > cnt){cnt=it->second;ans=it->first;}}cout<<ans<<endl;return 0;
} 
http://www.mmbaike.com/news/103218.html

相关文章:

  • wordpress扫码枪seo专员是干嘛的
  • 做产品推广哪个网站好山东服务好的seo
  • 做哪个网站卖一手房比较好优化设计方案
  • 鄂尔多斯网站制作 建设免费下载百度软件
  • 怎样建设一个游戏网站枣庄网络推广seo
  • 做室内概念图的网站百度推广网址是多少
  • 做网站起什么题目品牌推广策划
  • 推广网络长春seo快速排名
  • 做室内设计人喜欢的网站网络营销的几种模式
  • wordpress置顶 显示网站seo整站优化
  • 做食材的网站站长素材网
  • h5做招聘网站营销方案包括哪些内容
  • 网页界面设计的意义简单网站建设优化推广
  • 商务网站的主要内容教育培训加盟
  • 微网站建设加盟宁德市人口
  • 怎么建设外贸网站樱桃bt磁力天堂
  • 做网站找哪家公司好西安网络推广公司大全
  • 建设企业网站需要使用哪些技术厦门百度推广排名优化
  • app音乐网站开发天津网络关键词排名
  • 长沙交互网站设计服务商广告外链购买交易平台
  • 如何做kindle电子书下载网站推广计划书怎么写
  • 网站建站建设工作总结网络营销网站推广方案
  • 去哪里找做网站的关键词优化的原则
  • 保定有哪些做网站的地方刷钻业务推广网站
  • 彩票网站开发注意事情网站查询ip地址查询
  • 推推蛙网站诊断网站源码交易平台
  • 做的网站怎么上传推广策略怎么写
  • 制作网站用什么语言在线网站seo优化
  • wordpress能做企业站吗seo建设者
  • 苏州营销网站建设公司排名最近新闻头条