随笔分类 -  hash

poj 3007 Organize Your Train part II
摘要:http://poj.org/problem?id=3007用STL 会超时 用哈希哟本题哈希很简单,主要是字符串可能出现的各种情况处理起来有点复杂#include<iostream>#include<cmath>#include<string>#include<algorithm>#include<queue>#include<map>#include<set>#include<cstring>#include<cstdio>using namespace std;const int 阅读全文
posted @ 2012-05-18 18:10 夜-> 阅读(169) 评论(1) 推荐(0) 编辑
poj 3274 Gold Balanced Lineup
摘要:http://poj.org/problem?id=3274不得不说自己的哈希水平很烂 此题完全抄了别人的代码,看来以后要看看哈希呀先贴代码日后消化#include<iostream>#include<string>#include<string.h>#include<queue>#include<math.h>#include<stdio.h>#include<map>using namespace std;const int N=100010;const int prime=99983;int n,k;in 阅读全文
posted @ 2012-04-19 16:44 夜-> 阅读(162) 评论(0) 推荐(0) 编辑
poj 3349 Snowfalke Snow Snowflakes
摘要:http://poj.org/problem?id=3349#include<iostream>#include<cstdio>#include<string.h>#include<algorithm>#include<queue>#include<vector>#include<math.h>#define N 5000using namespace std;struct node{ int a[6]; int sum;}mem[100005];vector< int >str[5000];inl 阅读全文
posted @ 2012-03-27 20:19 夜-> 阅读(197) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示