这篇博客是从旧博客 WordPress 迁移过来,内容可能存在转换异常。
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1800
很邪恶的发现Trie都可以用STL map水过去~~~
用STL map做的:
#include
#include
using namespace std;
int n;
int main()
{
while (scanf("%d", &n;) != EOF)
{
map m;
map::iterator it;
int i, a;
for (i=0; isecond > max)
max = it->second;
}
printf("%d\n", max);
}
return 0;
}