HDU-1251 统计难题(map)
来源:互联网 发布:淘宝买衣服哪家店好 编辑:程序博客网 时间:2024/06/08 20:05
map可能比较耗时,但是这题能过
#include <cstdio>#include <iostream>#include <map>#include <cstring>#include <string>using namespace std;int main(){ char str[17]; map<string, int> m; while(gets(str)) { int len = strlen(str); if (!len) { break; } for(int i = len; i > 0; i--) { str[i] = '\0'; m[str]++; } } while(gets(str)) { cout<<m[str]<<endl; } return 0;}
0 0
- HDU 1251-统计难题(map)
- HDU-1251 统计难题(map)
- HDU--1251 统计难题【map】
- HDU 1251 统计难题(map)
- HDU-1251 统计难题(字典树+map)
- 【HDU】1251 - 统计难题(字典树 || STL - map & string)
- HDU-1251-统计难题(字典树||map)
- HDU 1251 统计难题(字典树,map)
- hdu 1251 统计难题< map<string,int> >
- hdu 1251 统计难题 (map水过)
- hdu 1251 统计难题 初识map
- HDU 1251 统计难题|[map秒杀]
- hdu 1251 统计难题 (Map的使用)
- HDU-1251 统计难题 map写法
- 统计难题(map)
- HDU 1251 统计难题(字典树(统计前缀数量) || map运用)
- HDU 1251 (统计难题) 字典树模板&&map实现
- HDU 1251:统计难题【字典树 & string+map】
- FastJson--阿里巴巴公司开源的速度最快的Json和对象转换工具
- kermit
- android 使用libmad 生成MP3左右声道的PCM文件
- 哈希表例子2
- Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION **
- HDU-1251 统计难题(map)
- poj 2112 Optimal Milking(二分+Floyd+最大流)
- Nginx的配置与部署研究,Upstream负载均衡模块
- 51.猴子吃桃问题
- WITH AS的用法
- 解决Exception: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z 等一系列问题
- tjut 2509
- nagios系列(八)之nagios通过nsclient监控windows主机
- Go语言之基本数据类型以及一些规范