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

iis 网站制作网站模仿侵权

iis 网站制作,网站模仿侵权,crm客户管理系统的功能有哪些,新媒体 数字营销 网站建设再散列之后散列函数要重新计算。 // kaifangliaobiao.cpp : 定义控制台应用程序的入口点。 //使用平方探测解决冲突问题时#xff0c;散列表至少空一半时#xff0c;总能插入一个新的元素#include stdafx.h #includeiostream using namespace std;#ifnde…         再散列之后散列函数要重新计算。 // kaifangliaobiao.cpp : 定义控制台应用程序的入口点。 //使用平方探测解决冲突问题时散列表至少空一半时总能插入一个新的元素#include stdafx.h #includeiostream using namespace std;#ifndef HashQuad typedef unsigned int Index; typedef Index Position;struct HashTbl; typedef struct HashTbl *HashTable;HashTable InitializeTable(int TableSize); void DestroyTable(HashTable H); Position Find(int key, HashTable H); void Insert(int key, HashTable H); int Retrieve(Position P, HashTable H); HashTable Rehash(HashTable H); #endif // !HashQuad #define MinTableSize 10enum KindOfEntry{Legitimate,Empty,Delete};struct HashEntry {int key;enum KindOfEntry Info; };typedef struct HashEntry Cell;struct HashTbl {int TableSize;Cell *TheCell; };int Hash(int key, int tableSize) {return key%tableSize; }int NextPrime(int n) {if (n % 2 0) n; //1.排除掉偶数for (;; n 2){bool isPrime 1; //2.标志位for (int i 3; i*i n; i 2)if (n%i 0) {isPrime 0;break;}if (isPrime)return n;} }HashTable InitializeTable(int TableSize) //初始化函数 {HashTable H;int i;if (TableSize MinTableSize){cout Table is too small;return NULL;}H (HashTable)malloc(sizeof(HashTbl)); //1.初始化散列表地址if (H NULL)cout out of space;H-TableSize NextPrime(TableSize); //2.用素数初始化散列表大小H-TheCell (Cell *)malloc(sizeof(Cell)*H-TableSize); //3.申请一个表头if (H-TheCell NULL)cout out of space;for (i 0; i H-TableSize; i)H-TheCell[i].Info Empty; //4.为每一个表项赋状态空return H; }Position Find(int key, HashTable H) //用平方探测散列法查找 {Position CurrentPos; //1.要返回的地址int CollisionNum; //2.偏移的位置量CollisionNum 0;CurrentPos Hash(key, H-TableSize);while (H-TheCell[CurrentPos].Info!EmptyH-TheCell[CurrentPos].key!key) //3.检测表项状态{CurrentPos 2 * CollisionNum - 1; //4.偏移if (CurrentPos H-TableSize) //5.满则折返CurrentPos - H-TableSize;}return CurrentPos; }void Insert(int key, HashTable H) {Position Pos;Pos Find(key, H);if (H-TheCell[Pos].Info ! Legitimate){H-TheCell[Pos].Info Legitimate;H-TheCell-key key;} }HashTable Rehash(HashTable H) //再散列 {int i, oldSize;Cell *OldCells;OldCells H-TheCell; //1.记录旧散列表的信息oldSize H-TableSize;H InitializeTable(2 * oldSize); //2.创建两倍大小的新散列表for (i 0; i oldSize; i) { //3.循环复制信息if (OldCells[i].Info Legitimate)Insert(OldCells[i].key, H);}free(OldCells);return H; }int main() {return 0; }     转载于:https://www.cnblogs.com/linear/p/6636876.html
http://wiki.neutronadmin.com/news/104327/

相关文章:

  • 东莞市网站建设分站做网站怎么发展客户
  • 济南企业自助建站成都网站制作是什么
  • 怎样申请建立自助网站广州海珠网络营销外包
  • 网站建设哪家强中国三大水电建设基地
  • 黄浦区未成年人思想道德建设网站网站的功能设计
  • 房产怎么创建网站没有网站可以备案吗
  • 天猫网站建设的意义旅游必去的10个地方
  • 外贸网站优化软件网站链接网址怎么做
  • 集团网站建设价格软件开发工具的基本功能是什么
  • 旅游电子商务网站建设调查问卷旅游网站 分析
  • 西宁最好网站建设公司成功的网站必须具备的要素
  • 优易官方网站类似全民互推的推广平台
  • 用旧手机做网站东营招标信息网官网首页
  • 淄博制作网站的公司长沙知名网站建设
  • 建设工程的招标网站有哪些windows优化大师卸载
  • html5手机网站建设企业咨询公司名称大全
  • 百度百科让做网站的超链接吗做网站备案都需要什么东西
  • 银川怎么做网站百度知道问答首页
  • 做pc端网站新闻宜兴网站开发
  • 魔站网站开发网站 开发逻辑
  • 怎么用ps做网站首页字天堂网
  • 网站由哪儿三部分组成哪里有网站设计公司
  • 朝阳企业网站建设方案wordpress主题首页问题
  • 提升网站打开速度系统app定制开发
  • 做网站哪种编程语言最好网站弹窗怎么做
  • 17岁高清免费观看完整版网站的结构与布局优化设计
  • 如何拿网站后台账号推广小程序拿佣金
  • 网站官网建设的价格种子搜索引擎在线
  • 做网站的app有什么作用wordpress 4.4 优化
  • 织梦网站图片设置多大wordpress新浪图床会挂吗