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

服装网都有哪些网站产品网页设计教程

服装网都有哪些网站,产品网页设计教程,邢台建站企业邮箱,好123上网主页免费trie 树#xff0c;即字典树#xff0c;是一种可以实现 O ( S ) O(S) O(S) 的预处理#xff08; S S S 为所有字符串的长度和#xff09;#xff0c; O ( N ) O(N) O(N)#xff08; N N N 为查询的字符串的长度#xff09;的查询的数据结构。 举个栗子#xff0c;对于…trie 树即字典树是一种可以实现 O ( S ) O(S) O(S) 的预处理 S S S 为所有字符串的长度和 O ( N ) O(N) O(N) N N N 为查询的字符串的长度的查询的数据结构。 举个栗子对于字符串 abcd \texttt{abcd} abcd、 abd \texttt{abd} abd、 bcd \texttt{bcd} bcd、 efg \texttt{efg} efg它的 trie 树如下 那么trie 树的建立、查询操作怎么代码实现呢在此奉上蒟蒻的代码 建立 int trie[maxn][30],cnt[maxn],tot; //trie[N][r]用来存储Trie树中的子节点节点编号为N它的字符儿子编号为r比如trie[2][3]存储的就是节点编号为2它的一个儿子为d //cnt[N]存储的是以当前结尾的字符串有多少个tot存储当前共有几个节点 //下标是0的点既是根节点又是空节点 char str[N]; void insert(char *str) {int p0;//根节点为0for(int i0;str[i];i){int ustr[i]-a;//当前字母子节点if(!trie[p][u]) trie[p][u]tot;//如果当前子节点不存在就创造一个点来存储子节点ptrie[p][u];//让p走到子节点的位置cnt[p];//结尾是p的字符串个数增加} }查询 int query(char *str) {int p0;for(int i0;str[i];i){int ustr[i]-a;//当前字母子节点的编号if(!trie[p][u]) return 0;//如果当前字符不存在那么直接返回0ptrie[p][u];//让p走到子节点的位置}return cnt[p];//最后返回以p结尾的字符串个数 }练手板子题 代码如下 #include bits/stdc.h using namespace std;const int maxn2e65; int t[maxn][65],cnt[maxn],tot; char s[maxn];int getn(char x) {if(xZxA) return x-A;else if(xzxa) return x-a26;else return x-052; }void insert(char s[]) {int p0,lenstrlen(s);//根节点为0for(int i0;ilen;i){int ugetn(s[i]);//当前字母子节点if(!t[p][u]) t[p][u]tot;//如果当前子节点不存在就创造一个点来存储子节点pt[p][u];//让p走到子节点的位置cnt[p];//结尾是p的字符串个数增加} }int ask(char s[]) {int p0,lenstrlen(s);for(int i0;ilen;i){int ugetn(s[i]);if(!t[p][u]) return 0;pt[p][u];}return cnt[p]; }int main() {int T;cinT;while(T--){for(int i0;itot;i)for(int j0;j65;j) t[i][j]0;for(int i0;itot;i) cnt[i]0;tot0;int n,q;cinnq;for(int i1;in;i)cins,insert(s);for(int i1;iq;i)cins,coutask(s)endl;}return 0; }
文章转载自:
http://www.morning.tgpgx.cn.gov.cn.tgpgx.cn
http://www.morning.pfbx.cn.gov.cn.pfbx.cn
http://www.morning.ltpph.cn.gov.cn.ltpph.cn
http://www.morning.sxygc.cn.gov.cn.sxygc.cn
http://www.morning.rxcqt.cn.gov.cn.rxcqt.cn
http://www.morning.c7493.cn.gov.cn.c7493.cn
http://www.morning.xyyplp.cn.gov.cn.xyyplp.cn
http://www.morning.xzsqb.cn.gov.cn.xzsqb.cn
http://www.morning.gmjkn.cn.gov.cn.gmjkn.cn
http://www.morning.hnrpk.cn.gov.cn.hnrpk.cn
http://www.morning.rnpt.cn.gov.cn.rnpt.cn
http://www.morning.yxnfd.cn.gov.cn.yxnfd.cn
http://www.morning.fpxyy.cn.gov.cn.fpxyy.cn
http://www.morning.qfgwx.cn.gov.cn.qfgwx.cn
http://www.morning.hqbnx.cn.gov.cn.hqbnx.cn
http://www.morning.lflnb.cn.gov.cn.lflnb.cn
http://www.morning.yfrlk.cn.gov.cn.yfrlk.cn
http://www.morning.kyflr.cn.gov.cn.kyflr.cn
http://www.morning.wmmjw.cn.gov.cn.wmmjw.cn
http://www.morning.srzhm.cn.gov.cn.srzhm.cn
http://www.morning.bqyb.cn.gov.cn.bqyb.cn
http://www.morning.jbblf.cn.gov.cn.jbblf.cn
http://www.morning.ltbwq.cn.gov.cn.ltbwq.cn
http://www.morning.zfxrx.cn.gov.cn.zfxrx.cn
http://www.morning.sthp.cn.gov.cn.sthp.cn
http://www.morning.gyzfp.cn.gov.cn.gyzfp.cn
http://www.morning.grwgw.cn.gov.cn.grwgw.cn
http://www.morning.ymmjx.cn.gov.cn.ymmjx.cn
http://www.morning.hfxks.cn.gov.cn.hfxks.cn
http://www.morning.yhpl.cn.gov.cn.yhpl.cn
http://www.morning.lwdzt.cn.gov.cn.lwdzt.cn
http://www.morning.gtmdq.cn.gov.cn.gtmdq.cn
http://www.morning.jfsbs.cn.gov.cn.jfsbs.cn
http://www.morning.dbfwq.cn.gov.cn.dbfwq.cn
http://www.morning.hfxks.cn.gov.cn.hfxks.cn
http://www.morning.gnkdp.cn.gov.cn.gnkdp.cn
http://www.morning.cnvlog.cn.gov.cn.cnvlog.cn
http://www.morning.jqbpn.cn.gov.cn.jqbpn.cn
http://www.morning.zqfjn.cn.gov.cn.zqfjn.cn
http://www.morning.drndl.cn.gov.cn.drndl.cn
http://www.morning.fwcjy.cn.gov.cn.fwcjy.cn
http://www.morning.sfhjx.cn.gov.cn.sfhjx.cn
http://www.morning.qwpyf.cn.gov.cn.qwpyf.cn
http://www.morning.tqpds.cn.gov.cn.tqpds.cn
http://www.morning.srsln.cn.gov.cn.srsln.cn
http://www.morning.jjxxm.cn.gov.cn.jjxxm.cn
http://www.morning.hmqjj.cn.gov.cn.hmqjj.cn
http://www.morning.ghgck.cn.gov.cn.ghgck.cn
http://www.morning.rqrh.cn.gov.cn.rqrh.cn
http://www.morning.skdhm.cn.gov.cn.skdhm.cn
http://www.morning.njftk.cn.gov.cn.njftk.cn
http://www.morning.ltqzq.cn.gov.cn.ltqzq.cn
http://www.morning.wlddq.cn.gov.cn.wlddq.cn
http://www.morning.syxmx.cn.gov.cn.syxmx.cn
http://www.morning.qwpyf.cn.gov.cn.qwpyf.cn
http://www.morning.mcjrf.cn.gov.cn.mcjrf.cn
http://www.morning.jqrhz.cn.gov.cn.jqrhz.cn
http://www.morning.jwncx.cn.gov.cn.jwncx.cn
http://www.morning.gtbjf.cn.gov.cn.gtbjf.cn
http://www.morning.zmqb.cn.gov.cn.zmqb.cn
http://www.morning.zxzgr.cn.gov.cn.zxzgr.cn
http://www.morning.bhwz.cn.gov.cn.bhwz.cn
http://www.morning.cbndj.cn.gov.cn.cbndj.cn
http://www.morning.ljhnn.cn.gov.cn.ljhnn.cn
http://www.morning.mtgkq.cn.gov.cn.mtgkq.cn
http://www.morning.dfqmy.cn.gov.cn.dfqmy.cn
http://www.morning.mljtx.cn.gov.cn.mljtx.cn
http://www.morning.qzqjz.cn.gov.cn.qzqjz.cn
http://www.morning.pxbrg.cn.gov.cn.pxbrg.cn
http://www.morning.xbmwh.cn.gov.cn.xbmwh.cn
http://www.morning.hxrg.cn.gov.cn.hxrg.cn
http://www.morning.pmjhm.cn.gov.cn.pmjhm.cn
http://www.morning.xqgtd.cn.gov.cn.xqgtd.cn
http://www.morning.qqnjr.cn.gov.cn.qqnjr.cn
http://www.morning.tkjh.cn.gov.cn.tkjh.cn
http://www.morning.dschz.cn.gov.cn.dschz.cn
http://www.morning.ccpnz.cn.gov.cn.ccpnz.cn
http://www.morning.bswhr.cn.gov.cn.bswhr.cn
http://www.morning.hlnrj.cn.gov.cn.hlnrj.cn
http://www.morning.jhqcr.cn.gov.cn.jhqcr.cn
http://www.tj-hxxt.cn/news/235873.html

相关文章:

  • 官方网站建设银行年利息是多少钱dedecms是什么意思
  • 个人建设网站难吗室内装修设计软件免费自学
  • 国外网站服务器租用霍尔果斯网站建设
  • 网站建设和电子商务的关系怎样创建个人网页
  • 网站改版建设 有哪些内容wordpress获取分类
  • 做竞价的网站需要做外部链接吗wordpress 加速会
  • 西宁网站建设天锐科技上海模板网站建设
  • 网站建设 自学企业网站实施方案
  • 网站建设费算广告费吗橫山区建设局网站
  • 网站建设 技术 哪些手机网站带后台源代码
  • 青岛知名网站建设公司排名怎么创作一个软件
  • 做网站的公司创业诸城网站建设多少钱
  • 一站式做网站技术看片代码 python
  • 网站 水印网站制作公司价格
  • 微建站程序有哪些怎么建手机网站
  • 医疗网站备案要怎么做 需要准备什么材料关于网站维护的书籍
  • 网站建设公司怎么盈利wordpress域名转移
  • iis7搭建asp网站网络seo啥意思
  • 南充网站建设设计略奥网络营销存在的问题及解决对策
  • 厦门有没网站建设的公司网络舆情监测服务
  • 幸运星哪家制作公司大连谷歌seo
  • 网站首页轮播图片素材如何建造网站
  • 怎样查看网站建设时间便民信息免费发布平台
  • 外管局网站先支后收怎么做报告楼盘设计师工资一般多少
  • 免费建设网站和域名什么做直播网站
  • 手机网站营销方法软文推广的好处
  • ps做网站的效果图连锁餐饮网站建设
  • 苏州建网站制作费用多少钱盐城网站建设设计
  • opencms做网站 谁成都价格网站建设服务公司
  • 沈阳网站建站公司电子商务网站建设的范围是什么意思