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

携程特牌 的同时做别的网站竞价推广平台有哪些

携程特牌 的同时做别的网站,竞价推广平台有哪些,网页设计代码单元格内容怎么居中,b2b2c网站建设我们可以根据二进位划分集合,从高到底,越来越 首先,最高位不同的点集合中,必须存在一条边,所以,可以用trie树来处理该操作并统计该边的数目。 然后对于两个不同的集合,递归重复这样的操作&#…

我们可以根据二进位划分集合,从高到底,越来越

首先,最高位不同的点集合中,必须存在一条边,所以,可以用trie树来处理该操作并统计该边的数目。

然后对于两个不同的集合,递归重复这样的操作,就会得到两个集合的MST。

附代码:

#include "iostream"
#include "cstdio"
#include "algorithm"
#include "cmath"
#include "queue"
#include "cstring"
#define LL long long 
#define fo(i ,j ,k) for(int i=j; i<=k; i++)
#define pa pair<int ,int>
#define inf 0x3f3f3f3f
using namespace std;
const int maxn = 1e5+5;
const int mod = 1e9+7;
const long long mo = 1e9+7;
int n ,a[maxn] ,s[maxn] ,t[maxn] ,cnt;
long long sum ,anscnt = 1;
struct node
{int nxt[2],cnt;
}tr[maxn*31];void init()
{fo(i ,0, cnt){tr[i].nxt[1] = tr[i].nxt[0] = tr[i].cnt = 0;}cnt = 0;
}
template<typename T>
void read(T &x)
{x = 0;char c = getchar();while(!isdigit(c))c = getchar();while(isdigit(c)){x = (x<<1) + (x<<3) + c -'0';c = getchar() ;}return ;
}long long power(int x ,int y)
{long long res = 1;while(y){if(y&1) res=1LL*res*x%mo;y>>=1;x = 1LL*x*x%mo;}    return res;
}void insert(int x)
{int p = 0;for(int i=30; i>=0; i--){int y = (x>>i)&1;if(!tr[p].nxt[y]){tr[p].nxt[y] = ++cnt;p = cnt;}else p = tr[p].nxt[y];}tr[p].cnt++;
}inline pa find(int x)
{int p = 0;int ans = 0;for(int i=30; i>=0; i--){int y = (x>>i)&1;if(tr[p].nxt[y])p = tr[p].nxt[y],ans|=(y<<i);else p = tr[p].nxt[y^1],ans|=((y^1)<<i);}return make_pair(ans^x ,tr[p].cnt);
}
void solve(int l ,int r , int dep)
{if(l>=r) return;if(dep<0){if(r-l>=1)anscnt=1LL*anscnt*power(r-l+1,r-l-1)%mod;return;}int  cnt1 = 0,cnt2 = 0;for(int i=l;i<=r;i++)if((a[i]>>dep)&1) s[cnt1++]=a[i];else t[cnt2++]=a[i];for(int i=0;i<cnt1;i++) a[l+i]=s[i];for(int i=0;i<cnt2;i++) a[l+cnt1+i]=t[i];init();pa tmp;int ans=inf,cnt=0;for(int i=0;i<cnt2;i++) insert(t[i]);for(int i=0;i<cnt1;i++){tmp=find(s[i]);if(tmp.first<ans)ans=tmp.first,cnt=tmp.second;else if(tmp.first==ans)cnt+=tmp.second;}if(sum!=inf&&cnt) sum+=ans,anscnt=1LL*cnt*anscnt%mo;solve(l,l+cnt1-1,dep-1);solve(l+cnt1,r,dep-1);
}int main(void)
{read(n);fo(i ,1 ,n){read(a[i]);}solve(1 ,n ,30);printf("%lld\n%d\n",sum,anscnt);return 0;
}

 

转载于:https://www.cnblogs.com/Mnirvana/p/8093357.html

http://www.lbrq.cn/news/2581867.html

相关文章:

  • ios个人开发者账号南京怎样优化关键词排名
  • 网站选项卡图标百度广告商
  • 开发一个网站多少钱啊全国疫情最新报告
  • wordpress 管理地址seo渠道是什么意思
  • 外语网站制作友情链接查询工具
  • 佛山专业做网站公司有哪些怎么做免费的网站推广
  • 投广告哪个平台好关键词优化策略有哪些
  • 聋哑工作设计做网站郑州seo管理
  • 网站建设做微营销搜索引擎优化是做什么的
  • 南京怎么做网站谷歌下载
  • 网站的404如何做网页设计模板网站免费
  • 河北省城乡住房和城乡建设厅网站百度快照推广效果怎样
  • 网络推广专员招聘关键词首页排名优化
  • app建设网站公司哪家好抖音seo推荐算法
  • github 做网站南京疫情最新消息
  • 免费的个人简历模板电子版下载北京seo网站设计
  • 怎么一个网站做的竞价怎么弄自己的网站
  • 手机网站域做什么广告企业培训课程设计
  • 手机版的网站用什么开发上海seo顾问推推蛙
  • 做的好的h游戏下载网站危机公关处理方案
  • 网站的折线图怎么做目录型搜索引擎有哪些
  • 河南移动官网网站建设搜索网页内容
  • 网站如何做即时聊天杭州网站推广与优化
  • 常州建设安全员报名网站nba最新消息交易情况
  • 广西建设厅网站首页打开百度一下你就知道
  • 做网站哪商品标题关键词优化
  • wordpress做电商网站dz论坛seo设置
  • 郑州网站建设制作费用网络营销的四个特点
  • 南汇做网站公司百度营销推广
  • 网站重新备案 需要关闭网站么竞价推广培训课程
  • 【量化交易】日内交易有效特征因子
  • Java 大视界 -- Java 大数据机器学习模型在金融市场情绪分析与投资决策辅助中的应用(379)
  • 单位长度上的RC参数
  • 分布式事务----spring操作多个数据库,事务以及事务回滚还有用吗
  • PyTorch 张量核心操作——比较、排序与数据校验
  • 分布在背侧海马体CA1区域的位置细胞(place cells)对NLP中的深层语义分析的积极影响和启示