hdu 1263 水果
来源:互联网 发布:电脑中文编程语言视频 编辑:程序博客网 时间:2024/05/01 11:06
#include <cstdio>#include <iostream>#include <string>#include <map>#include <algorithm>using namespace std;typedef map<string, map<string, int> > mapp;int main(){ int t, n, i, k; string fruit, place; mapp a; mapp::iterator ite; map<string, int>::iterator jte; cin>>t; while(t--){ cin>>n; for(i=0; i<n; i++){ cin>>fruit>>place>>k; a[place][fruit] += k; } for(ite=a.begin(); ite!=a.end(); ite++){ cout<<ite->first<<endl; for(jte=(ite->second).begin(); jte!=(ite->second).end(); jte++){ cout<<" |----"<<jte->first<<'('<<jte->second<<')'<<endl; } } a.clear(); if(t!=0) cout<<endl; } return 0;}
0 0
- hdu 1263 水果
- hdu - 1263 水果
- HDU 1263 水果
- hdu 1263 水果
- HDU 1263 水果
- 水果 hdu 1263 模拟
- HDU 1263 水果
- HDU 1263 水果
- hdu 1263 水果
- HDU 1263 水果
- hdu 1263 水果
- hdu 1263 水果
- hdu 1263 水果
- hdu 1263 水果
- hdu 1263 水果
- HDU 1263 水果
- HDU 1263 水果
- ACM HDU 1263水果
- 数论四大定理
- hdu 1075 What Are You Talking About
- Vim配置目录结构
- 金明的预算方案
- hdu 5182 水题
- hdu 1263 水果
- Android Studio 快捷键 (OSX)
- 黑马程序员——Java多线程2
- Vim中的buffer, window, tab
- 网易云课堂《Linux内和分析》汇编分析和寻址方式小结(一)
- Linux内核编译详解
- CSS小结
- 怎样获取按钮的坐标
- 【设计模式】——六芒星