摘要: http://poj.org/problem?id=2418题意:给定一些树,按字典序输出数名和树出现的频率;思路:这个题用二叉搜索树可以做,同时在网上看到了一个简单的方法,用map来做,这里map真是太好用了;map做法:View Code #include <iostream>#include <map>#include <cstdio>#include <string>using namespace std;int main(){ string a; map<string,int>tree; double n = 0; char 阅读全文
posted @ 2012-03-23 19:26 LT-blogs 阅读(184) 评论(0) 推荐(0) 编辑