POJ 之 Hardwood Species】的更多相关文章

题目链接: id=2418">http://poj.org/problem?id=2418 Hardwood Species Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 17511   Accepted: 6949 Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or n…
                                                 Hardwood Species Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 16056   Accepted: 6418 Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or n…
Hardwood Species Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 17986   Accepted: 7138 Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter.  Amer…
                                                     Hardwood Species Time Limit:10000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u   Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or nu…
题目:http://poj.org/problem?id=2418 在poj 上交题总是有各种错误,再次感叹各个编译器. c++ AC代码,G++为超时,上代码: #include<cstdio> #include<string> #include<map> using namespace std; ]; int main() { map<string,int>mp; map<string,int>::iterator iter;//声明迭代器…
职务地址:id=2418">POJ 2418 通过这个题查了大量资料..知道了非常多曾经不知道的东西. . .. 在代码中凝视说明吧. 代码例如以下: #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <stdlib.h> #include <math.h> #include <ctype.h&g…
1.输入若干行树名,输入结束后,按字典序输出树名及其所占百分比. 2.多种方法:map,trie,BST 3. map: #include<iostream> #include<stdio.h> #include<string> #include<map> using namespace std; int main(){ map<string,int>h; string s; int n; n=; while(getline(cin,s)){ +…
题目传送门 题意:输入一大堆字符串,问字典序输出每个字符串占的百分比 分析:二叉搜索树插入,然后中序遍历就是字典序,这里root 被new出来后要指向NULL,RE好几次.这题暴力sort也是可以过的... //#include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <iostream> using namespace std; struct BST { char name…
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> typedef struct AVLTree{ char name[31]; int nCount; int nHeight; struct AVLTree* pLeft; struct AVLTree* pRight; }AVLTree; int Max( int a, int b ); int Heig…
我的错因: 本来改用%f输出,我用了%lf,结果编译器直接判定为错误(一部分编译器认为lf是没有错的).当时我还以为是hash出错了.. 方法不止一种: 方法 时间   空间 Hash 891ms 596k map<string,int> 2735ms   1316k sort 5000ms+ 30000k+ %lf 与 %f的具体区别: printf的%f说明符的确既可以输出float型又可以输出double型.根据"默认参数提升"规则float型会被提升为double型…