首页 > 其他 > 详细

双重 hash

时间:2018-07-27 20:08:46      阅读:135      评论:0      收藏:0      [点我收藏+]
#include<stdio.h>
#include<map>
#include<queue>
#include<algorithm>
using namespace std;
typedef long long ll;
pair<ll,ll>pp;
pair<ll,ll> Hash(ll a[21])
{
	ll ans1=0,ans2=0;
	for(ll i=0;i<21;i++)
		ans1=(ans1*1000000013+a[i])%1000000007;
	for(ll i=0;i<21;i++)
		ans2=(ans2*1000000013+a[i])%1000000009;
	pp.first=ans1;
	pp.second=ans2;
	return pp;
}

 

双重 hash

原文:https://www.cnblogs.com/ccut-ry/p/9379235.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!