
哈希表(散列表)
nacrt
这个作者很懒,什么都没留下…
展开
-
poj1840 Eqs(哈希表)
原题链接:Eqs 题意:求满足方程的解的个数 枚举打表吧 #include #include using namespace std; const int MAX_S = 50 * 50 * 50 * 50 * 2; //前两项和的最大值 short ht[MAX_S * 2 + 1]; //*2 此处用short类型,内存勉强过了 int main(){ int a1,原创 2017-04-28 18:17:43 · 1225 阅读 · 0 评论 -
poj3349 Snowflake Snow Snowflakes(哈希表,散列表)
原题链接:点击打开链接 题意:有n片雪花, 雪花都是六棱的,如果六棱的长度对应完全相等(正序或反序),则认为两片雪花相同。 //哈希表 #include #include const int MOD = 12497; const int MAX_N = MOD + 1; const int MAX_L = 20; struct SNOW { int a[6]; }; SNOW hash原创 2017-04-26 16:22:35 · 1263 阅读 · 0 评论