線性探查法
摘要:
題目:http://acm.hdu.edu.cn/showproblem.php?pid=1496這個方法好快哦。View Code #include "iostream"#include "string"using namespace std;#define MAX 40000typedef struct hash{ int key; //乘積 int num; //乘積個數}hash;hash h[MAX];int Line(int k){ //線性探查法 int d = k%MAX; if(d<0){ d+=MAX; } while(h[.. 閱讀全文
posted @ 2012-05-20 19:33 More study needed. 閱讀(1749) 評論(0) 推薦(0)
浙公網安備 33010602011771號