hdu 4287 Intelligent IME STL应用
来源:互联网 发布:淘宝网购物ppt 编辑:程序博客网 时间:2024/06/05 15:10
STL的map容器应用
#include<stdio.h>#include<string.h>#include<stdlib.h>#include<map>#include<algorithm>#include<iostream>using namespace std;map<string,int>mp;char str[6000][10];char ss[28]="22233344455566677778889999";int main(){ int n,m; int t; scanf("%d",&t); char s1[10]; while(t--) { mp.clear(); scanf("%d%d",&n,&m); for(int i=0; i<n; i++) { scanf("%s",str[i]); mp[str[i]]=1; } string s2; for(int i=0; i<m; i++) { s2=""; scanf("%s",s1); int len=strlen(s1); for(int j=0; j<len; j++) { int k=s1[j]-'a'; s2+=ss[k]; } mp[s2]++; } for(int i=0;i<n;i++) printf("%d\n",mp[str[i]]-1); } return 0;}
0 0
- hdu 4287 Intelligent IME STL应用
- HDU 4287 Intelligent IME map的应用
- hdu 4287 Intelligent IME
- HDU-4287-Intelligent IME
- HDU 4287 Intelligent IME
- hdu 4287 Intelligent IME
- Intelligent IME hdu 4287
- HDU 4287 Intelligent IME
- HDU 4287 Intelligent IME
- HDU 4287 Intelligent IME
- hdu-4287 Intelligent IME
- hdu 4287 Intelligent IME
- HDU 4287 - Intelligent IME
- HDU 4287 Intelligent IME
- HDU 4287 Intelligent IME
- hdu 4287 Intelligent IME
- hdu 4287 Intelligent IME
- hdu-4287 Intelligent IME
- C# string转byte[]
- IOS-Quartz2D基础绘画
- java学习阶段性总结
- 关于dataGrid的排序自定义排序规则
- leveldb调用get时,string把value截断。解决方案
- hdu 4287 Intelligent IME STL应用
- 【c++程序】指针数组与数组指针
- Android简单通讯录的开发
- HTML网页开发(燕十八)-实战首页布局-作业
- HTML5学习---必学的14大知识点(资源大全)
- Tomcat学习总结(6)——Tomca常用配置详解
- 读书-方与圆
- PHP 对 png 图像进行缩放,支持透明背景
- STL容器的常用方法