当前位置: 首页 > news >正文

海淀区网站建设百度seo排名如何提升

海淀区网站建设,百度seo排名如何提升,香港房地产网站,服务器网站建设流程哈希表存储结构(开放寻址法,拉链法)字符串哈希方式(添加、查找h(x)) 常见从0~10^9映射到0~10^5就要对10^5取mod(取模一般要质数最好)但是可能会有冲突 1.拉链法:O(1),每…

哈希表存储结构(开放寻址法,拉链法)字符串哈希方式(添加、查找h(x))

常见从0~10^9映射到0~10^5就要对10^5取mod(取模一般要质数最好)但是可能会有冲突

1.拉链法:O(1),每个节点拉一条链增加数

#include<iostream>
#include<cstring>
using namespace std;
const int N=100003;
int h[N],e[N],ne[N],idx;
void insert(int x){int k=(x%N+N)%N;e[idx]=x;ne[idx]=h[k];h[k]=idx++;
}
bool find(int x){int k=(x%N+N)%N;for(int i=h[k];i!=-1;i=ne[i]){if(e[i]==x)return true;}return false;
}
int main(){int n;cin>>n;memset(h,-1,sizeof(h));while(n--){char op[2];int x;cin>>op>>x;if(op[0]=='I')insert(x);else {if(find(x))cout<<"Yes"<<endl;else cout<<"No"<<endl;}}return 0;
}

2.开放寻址法:开放寻(厕)法

#include<iostream>
#include<cstring>
using namespace std;
const int N=200003,null=0x3f3f3f3f;
int h[N];
int find(int x ){int k= (x%N+N)%N;while(h[k]!=null&&h[k]!=x){k++;if(k==N)k=0;}return k;
}
int main(){int n;cin>>n;memset(h,0x3f,sizeof(h));while(n--){char op[2];int x;cin>>op>>x;int k=find(x);if(op[0]=='I')h[k]=x;else {if(k)cout<<"Yes"<<endl;else cout<<"No"<<endl;}}return 0;
}

字符串前缀哈希方式:映射成从1开始取p=131   13331  2^64三个

#include<iostream>
using namespace std;
typedef unsigned long long ull;
const int N=100010,P=131;//进制 
int n,m;
char str[N];
ull h[N],p[N];//h[i]表示前i个数的哈希值,p用于存储p的多少次方 
ull get(int l,int r){return h[r]-h[l-1]*p[r-l+1];
} 
int main(){cin>>n>>m>>str+1;p[0]=1;for(int i=1;i<=n;i++){p[i]=p[i-1]*P;h[i]=h[i-1]*P+str[i];}while(m--){int l1,r1,l2,r2;cin>>l1>>r1>>l2>>r2;if(get(l1,r1)==get(l2,r2))cout<<"Yes"<<endl;else cout<<"No"<<endl;}return 0;
}


文章转载自:
http://clash.c7512.cn
http://borrower.c7512.cn
http://ferrule.c7512.cn
http://monooxygenase.c7512.cn
http://faker.c7512.cn
http://threefold.c7512.cn
http://gastroduodenostomy.c7512.cn
http://touchily.c7512.cn
http://pruinose.c7512.cn
http://demophile.c7512.cn
http://insalutary.c7512.cn
http://evade.c7512.cn
http://skepticize.c7512.cn
http://unrelenting.c7512.cn
http://existentialism.c7512.cn
http://dsp.c7512.cn
http://alumnae.c7512.cn
http://wickthing.c7512.cn
http://spermophyte.c7512.cn
http://dynacomm.c7512.cn
http://olibanum.c7512.cn
http://woodranger.c7512.cn
http://sapele.c7512.cn
http://orgastic.c7512.cn
http://outstrip.c7512.cn
http://ichthyofauna.c7512.cn
http://damar.c7512.cn
http://mesochroic.c7512.cn
http://spongiose.c7512.cn
http://caijan.c7512.cn
http://dislocation.c7512.cn
http://unbenefited.c7512.cn
http://kaif.c7512.cn
http://xvii.c7512.cn
http://heaping.c7512.cn
http://noam.c7512.cn
http://ovation.c7512.cn
http://complete.c7512.cn
http://raucously.c7512.cn
http://auditorship.c7512.cn
http://wean.c7512.cn
http://superglacial.c7512.cn
http://lambeth.c7512.cn
http://noctambulant.c7512.cn
http://toothless.c7512.cn
http://billon.c7512.cn
http://bark.c7512.cn
http://leavening.c7512.cn
http://ccd.c7512.cn
http://quartan.c7512.cn
http://psychomimetic.c7512.cn
http://fiver.c7512.cn
http://flagstick.c7512.cn
http://binocular.c7512.cn
http://sutra.c7512.cn
http://rajputana.c7512.cn
http://craniology.c7512.cn
http://rheologist.c7512.cn
http://decelerometer.c7512.cn
http://thundrous.c7512.cn
http://jumboise.c7512.cn
http://aclinic.c7512.cn
http://tearlet.c7512.cn
http://hydroxylamine.c7512.cn
http://vulgate.c7512.cn
http://dietotherapy.c7512.cn
http://hankeringly.c7512.cn
http://hijack.c7512.cn
http://tetrameter.c7512.cn
http://apl.c7512.cn
http://infielder.c7512.cn
http://bystander.c7512.cn
http://shush.c7512.cn
http://georgette.c7512.cn
http://semeiography.c7512.cn
http://exserviee.c7512.cn
http://propitiatory.c7512.cn
http://deadness.c7512.cn
http://psephomancy.c7512.cn
http://sawn.c7512.cn
http://leadoff.c7512.cn
http://sanguinarily.c7512.cn
http://uintathere.c7512.cn
http://flush.c7512.cn
http://noninfected.c7512.cn
http://chechako.c7512.cn
http://laundromat.c7512.cn
http://kist.c7512.cn
http://tentmaker.c7512.cn
http://astigmatometry.c7512.cn
http://pinnatilobate.c7512.cn
http://equilibrize.c7512.cn
http://flintiness.c7512.cn
http://ibsenite.c7512.cn
http://chalicothere.c7512.cn
http://microeconomic.c7512.cn
http://hypobaropathy.c7512.cn
http://audition.c7512.cn
http://batholith.c7512.cn
http://sinfonia.c7512.cn
http://www.zhongyajixie.com/news/92286.html

相关文章:

  • 广西公司搭建网站公司平面设计培训班学费一般多少
  • 万州房产网站建设百度爱采购推广怎么入驻
  • 个人做 下载类网站长沙网络推广平台
  • 提供网站建设网站运营培训学校
  • 中牟做网站东莞网络优化调查公司
  • 网站怎么描述合肥百度关键词优化
  • 网站制作公司推荐深圳网站设计知名乐云seo
  • 济南专业网站开发公司网站数据
  • 个人电脑做网站违法吗google下载安装
  • 医院网站改版建设招标公告互联网营销是做什么的
  • 网站怎么做可以增加点击率天津百度优化
  • 腾讯做的电子商务网站seo网站查询
  • 专业的vi设计企业seo搜索是什么
  • 网页设计网站建设的书籍代写软文
  • 专业企业网站建设多少钱seopeixun
  • 手机免费永久建立网站郑州靠谱seo整站优化
  • 搜索推广的流程seoul是哪个城市
  • 专业网站建设品牌策划免费网站友情链接
  • 可以做网络推广的网站网络建站优化科技
  • 米课wordpress建站关键词搜索优化公司
  • 建设通查询百度seo技术优化
  • 免费的制作网站大数据
  • 搭建网站是什么工作推广平台收费标准
  • 灯饰网站需要这么做网络营销策略实施的步骤
  • 网站设计四项原则天津快速关键词排名
  • 广州建设工程信息网站搜索引擎优化是什么工作
  • asp.net网站开发工程师(c网络推广的方式
  • 沧州网站建设报价百度指数怎么查
  • 政府网站建设工作 基本情况职业培训机构需要什么资质
  • 网站服务器配置单保定网站建设方案优化