poj 2418 Hardwood Species
摘要:
map// 题意:给出不同的树,求每种树所占的比例,并要求树名按字典序由小到大输出#include <iostream>#include <string>#include <map>using namespace std;int main(){ map<string,int> col; char str[100]; double tot=0; while(gets(str)) { col[str]++; tot+=1; } for(map<string,int>::iterator ite=col.begin();ite!=... 阅读全文
posted @ 2012-03-14 22:36 sysu_mjc 阅读(157) 评论(0) 推荐(0) 编辑