随笔分类 - 数据结构—哈希表
摘要:题目:http://poj.org/problem?id=3274 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 using namespace std;13 14 #define prime 10000315 int n,k,f;16 int bit[prime][32],head[prime],next[prime];17 int hash(int v[])//据说 这叫折叠法,我还是不明白.
阅读全文
摘要:题目:http://poj.org/problem?id=2513参考博客:http://blog.csdn.net/lyy289065406/article/details/6647445http://www.cnblogs.com/LK1994/p/3263462.html 1 #include...
阅读全文
摘要:题目:http://poj.org/problem?id=1840题解:http://blog.csdn.net/lyy289065406/article/details/6647387小优姐讲的很好了 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 short hash[25000001]; 9 int main()10 {11 int a1,a2,a3,a4,a5;12 int x1,x2,x3,x4,x5;13 int s...
阅读全文

浙公网安备 33010602011771号