HDU 1251
来源:互联网 发布:菜鸟是什么意思网络 编辑:程序博客网 时间:2024/05/18 15:57
字典树,map水过。
#include <cstdio>#include <cstring>#include <map>#include <iostream>#include <algorithm>using namespace std;map<string,int> mp;char st[1000];int main(){ mp.clear(); while(gets(st)){ if(st[0]=='\0') break; int len = strlen(st); for(int i=len-1;i>=0;i--){ mp[st]++; st[i]='\0'; } } while(gets(st)){ printf("%d\n",mp[st]); } return 0;}
0 0
- hdu 1251
- hdu 1251
- HDU 1251
- hdu 1251
- HDU-1251
- HDU 1251
- hdu 1251
- hdu-1251
- hdu 1251
- HDU 1251
- HDU 1251
- hdu 1251
- HDU 1251
- hdu 1251
- hdu 1251
- hdu 1251
- hdu-1251
- HDU 1251
- SDWebImage获取到UIImage分辨率跟原图不一样
- java的反编译器
- Codeforces 742A Arpa’s hard exam and Mehrdad’s naive cheat
- Android 状态栏的颜色修改
- d
- HDU 1251
- axure中默认字体样式的设置
- slf4j和其他日志系统桥接图
- Oracle归档模式与非归档模式设置
- 因数据迁移导致跨库连接失效的解决办法
- win10和centOS7双系统,默认启动win10
- Linux进程间通信
- HTTPS 服务器和客户端如何进行加密解密的?
- -bash: yum: command not found