当前位置:网站首页>Pat 1157: school anniversary
Pat 1157: school anniversary
2022-06-24 08:19:00 【Duange】
subject


Chinese translation

Code
#include <iostream>
#include <string>
#include <unordered_set>
using namespace std;
int main()
{
int n,m;
cin>>n;
unordered_set<string>hash;
while(n--)
{
string name;
cin>>name;
hash.insert(name);
}
cin>>m;
string a,b;
int cnt=0;
while(m--)
{
string name;
cin>>name;
if(hash.count(name))
{
cnt++;
if(a.empty() || a.substr(6,8)>name.substr(6,8)) a=name;
}
if(b.empty() || b.substr(6,8) >name.substr(6,8)) b=name;
}
cout<<cnt<<endl;
if(cnt) cout<<a<<endl;
else cout<<b<<endl;
return 0;
}
边栏推荐
- os.path.join()使用过程中遇到的坑
- GraphMAE----论文快速阅读
- 2021-03-11 COMP9021第八节课笔记
- Catégorie de prêt 5
- Four models of iPhone 13 series have been exposed, and indeed, they are 13 fragrant!
- 将mysql的数据库导出xxx.sql,将xxx.sql文件导入到服务器的mysql中。项目部署。
- 工控机防破解
- Decltype usage introduction
- Saccadenet: use corner features to fine tune the two stage prediction frame | CVPR 2020
- 贷款五级分类
猜你喜欢

Screenshot recommendation - snipaste

MAYA重新拓布

Swift Extension NetworkUtil(网络监听)(源码)

Swift 基础 Swift才有的特性

Future trends in automated testing
![[nilm] non intrusive load decomposition module nilmtk installation tutorial](/img/d0/bc5ea1cbca9ee96a2fe168484ffec4.png)
[nilm] non intrusive load decomposition module nilmtk installation tutorial

根据网络上的视频的m3u8文件通过ffmpeg进行合成视频

Ad-gcl:advantageous graph augmentation to improve graph contractual learning

Swift 基礎 閉包/Block的使用(源碼)

GraphMAE----論文快速閱讀
随机推荐
C语言_字符串与指针的爱恨情仇
SQL intra statement operation
模型效果优化,试一下多种交叉验证的方法(系统实操)
Solution of electric education system for intelligent supervision station
新准则金融资产三分类:AMC、FVOCI和FVTPL
复习SGI STL二级空间配置器(内存池) | 笔记自用
Atguigu---15- built in instruction
一文带你了解Windows操作系统安全,保护自己的电脑不受侵害
Live broadcast review | detailed explanation of koordinator architecture of cloud native hybrid system (complete ppt attached)
pyQt 中 QMenu 响应
Qopengl display point cloud file
Swift 基礎 閉包/Block的使用(源碼)
2022茶艺师(中级)上岗证题库及在线模拟考试
Écouter le réseau d'extension SWIFT (source)
More appropriate development mode under epidemic situation
软件工程导论——第二章——可行性研究
软件过程与项目管理期末复习与重点
Easyplayerpro win configuration full screen mode can not be full screen why
pyQt 常用系统的事件
51单片机_外部中断 与 定时/计数器中断