PAT5-06. 航空公司VIP客户查询
来源:互联网 发布:苹果电脑mac怎么截图 编辑:程序博客网 时间:2024/05/01 02:30
用iostream读取是很耗时间的
#include<unordered_map>#include<string>#include<iostream>using namespace std;int main(){ unordered_map<string,int>man; char id[30]; int n,thresh; scanf("%d %d",&n,&thresh); while(n--){ int b;scanf("%s %d",id,&b); man[string(id)]+=max(b,thresh); } int m;scanf("%d",&m); while(m--){ scanf("%s",id);string a(id); if(man.count(a)==0) printf("No Info\n"); else printf("%d\n",man[a]); } return 0;}
0 0
- PAT5-06. 航空公司VIP客户查询
- 航空公司VIP客户查询
- 航空公司VIP客户查询
- 航空公司VIP客户查询【PAT】
- PAT DS 506 航空公司VIP客户查询
- PTA 7-15 航空公司VIP客户查询
- 航空公司VIP客户查询(25 分)
- 5-45 航空公司VIP客户查询 (25分)
- PTA-数据结构 5-45 航空公司VIP客户查询 (25分)
- PAT 航空公司VIP客户查询 (哈希 | map) -- 解题报告
- 航空公司VIP客户查询(25 分)(Hash)
- 《数据结构学习与实验指导》5-6:航空公司VIP客户查询
- 7-15(查找) 航空公司VIP客户查询(25 分)
- PTA 7-15(查找) 航空公司VIP客户查询(25 分) 25分代码 哈希方法
- 航空公司客户价值分析
- 实战:航空公司客户价值分析
- 3航空公司客户价值分析
- 利用聚类分析航空公司客户价值
- wince 6410Blogo全屏修改
- 跳转漏洞的检测和修复
- Android 高级控件ExpandabledListView详解
- 车牌识别SDK简析
- ARC中block块作为属性的使用笔记
- PAT5-06. 航空公司VIP客户查询
- 改变窗口大小视图区图形也会跟着变化 MFC
- JAVA之关于This的用法
- 如何优化tableView
- protoc 2.5 安装
- 车牌识别算法简析
- Python tcp 连接测试,例子是(Python核心编程里面的例子)
- TextView设置不同的字体风格
- 二叉树的非递归遍历