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

石家庄做网站和宣传的制作app软件平台

石家庄做网站和宣传的,制作app软件平台,青岛 机械 中企动力提供网站建设,用区块链来做网站显然我们直接看前一半&#xff0c;然后我们按照斜行看&#xff0c;我们发现斜行是递增的&#xff0c;而同一行从左向右也是递增的&#xff0c;因此我们可以直接二分&#xff0c;同时我们发现对称轴的数为Ck,2k. 我们从16斜行枚举即可 #include<bits/stdc.h> using name…

显然我们直接看前一半,然后我们按照斜行看,我们发现斜行是递增的,而同一行从左向右也是递增的,因此我们可以直接二分,同时我们发现对称轴的数为Ck,2k.

我们从16斜行枚举即可

#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int n;
LL C(int a,int b){LL res=1;for(int i=a,j=1;j<=b;i--,j++){res=res*i/j;if(res>n) return res;}return res;
}
bool check(int k){LL l=k*2,r=n;if(l>r) return 0;while(l<r){LL mid=l+r>>1;if(C(mid,k)>=n) r=mid;else l=mid+1;}if(C(r,k)!=n) return 0;cout<<(r+1)*r/2+k+1;return 1;
}
int main(){cin>>n;for(int k=16;;k--){if(check(k)){break;}}
}

2.spfa的本质(妙)

我们令f[i][j]表示在i步以内可以生成j作物的方法的集合,我们记录其最小时间,答案就是f[n-1][t],对于初始值,f[0][xi]=0,对于f[i][j],我们可以看看j的生成方式即可,即f[i][j]=min(f[i][j],max(f[i-1][x],f[i-1][y])),复杂度为(n-1)k,我们加个spfa思想优化,j是由x,y更新的,只有x,y更新j才可能更新,

下面是AC代码:

#include<bits/stdc++.h>
using namespace std;
const int N=2010,M=200010;
int n,m;
int h[N],e[M],w[N],target[M],ne[M],idx;
int dis[N];
queue<int> q;
bool st[N];
void add(int a,int b,int c){e[idx]=b,target[idx]=c,ne[idx]=h[a],h[a]=idx++;
}
void spfa(){while(q.size()){int x=q.front();q.pop();st[x]=0;for(int i=h[x];i!=-1;i=ne[i]){int y=e[i],z=target[i];if(dis[z]>max(dis[x],dis[y])+max(w[x],w[y])){dis[z]=max(dis[x],dis[y])+max(w[x],w[y]);if(!st[z]){q.push(z);st[z]=1;}}}}
}
int main(){int k,T;cin>>n>>m>>k>>T;memset(h,-1,sizeof(h));for(int i=1;i<=n;i++) scanf("%d",&w[i]);memset(dis,0x3f,sizeof(dis));while(m--){int x;scanf("%d",&x);dis[x]=0;q.push(x);st[x]=1;}while(k--){int a,b,c;scanf("%d%d%d",&a,&b,&c);add(a,b,c);add(b,a,c);}spfa();cout<<dis[T];
}

3.欧拉函数:

下面是数学推导:

下面是AC代码:

#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
LL gcd(LL a,LL b){return b?gcd(b,a%b):a;
}
LL phi(LL m){LL res=m;for(LL i=2;i<=m/i;i++){if(m%i==0){while(m%i==0) m/=i;res=res/i*(i-1);}}if(m>1) res=res/m*(m-1);return res;
}
int main(){int T;cin>>T;while(T--){LL a,m;cin>>a>>m;LL d=gcd(a,m);cout<<phi(m/d)<<endl;}
}


文章转载自:
http://idiochromatic.gthc.cn
http://colourbred.gthc.cn
http://matrimony.gthc.cn
http://poloidal.gthc.cn
http://nutritive.gthc.cn
http://ini.gthc.cn
http://smokemeter.gthc.cn
http://difficult.gthc.cn
http://whitefish.gthc.cn
http://sadistic.gthc.cn
http://whereases.gthc.cn
http://rumbullion.gthc.cn
http://reinvite.gthc.cn
http://nonchalance.gthc.cn
http://polygraph.gthc.cn
http://ringy.gthc.cn
http://intine.gthc.cn
http://kuru.gthc.cn
http://lattakia.gthc.cn
http://dicoumarin.gthc.cn
http://downfold.gthc.cn
http://numbfish.gthc.cn
http://loir.gthc.cn
http://ringdove.gthc.cn
http://blackish.gthc.cn
http://worldling.gthc.cn
http://enterotoxemia.gthc.cn
http://cottager.gthc.cn
http://semidominant.gthc.cn
http://picomole.gthc.cn
http://drilling.gthc.cn
http://theatre.gthc.cn
http://recollectedness.gthc.cn
http://sentimentalism.gthc.cn
http://neurectomy.gthc.cn
http://majestic.gthc.cn
http://scriptural.gthc.cn
http://ossuarium.gthc.cn
http://squillagee.gthc.cn
http://hystricomorphic.gthc.cn
http://fingered.gthc.cn
http://provider.gthc.cn
http://leatherleaf.gthc.cn
http://friseur.gthc.cn
http://tetrabranchiate.gthc.cn
http://damageable.gthc.cn
http://sensorineural.gthc.cn
http://lycurgus.gthc.cn
http://artotype.gthc.cn
http://anovulatory.gthc.cn
http://vegetation.gthc.cn
http://thyroidectomize.gthc.cn
http://barbital.gthc.cn
http://mystagogical.gthc.cn
http://nostril.gthc.cn
http://chaikovski.gthc.cn
http://settecento.gthc.cn
http://canephoros.gthc.cn
http://cohabit.gthc.cn
http://odalisque.gthc.cn
http://irrepressibility.gthc.cn
http://subcontiguous.gthc.cn
http://affuse.gthc.cn
http://ranchero.gthc.cn
http://injudicial.gthc.cn
http://westmorland.gthc.cn
http://valse.gthc.cn
http://ammophilous.gthc.cn
http://dashi.gthc.cn
http://yh.gthc.cn
http://shwa.gthc.cn
http://otorrhea.gthc.cn
http://genette.gthc.cn
http://juno.gthc.cn
http://perjurer.gthc.cn
http://cuttage.gthc.cn
http://taxite.gthc.cn
http://didakai.gthc.cn
http://coastguard.gthc.cn
http://streetwalking.gthc.cn
http://reprehensive.gthc.cn
http://supervisory.gthc.cn
http://consideration.gthc.cn
http://stibium.gthc.cn
http://pavlovism.gthc.cn
http://underslung.gthc.cn
http://soddy.gthc.cn
http://maoriland.gthc.cn
http://uninventive.gthc.cn
http://rainsuit.gthc.cn
http://scalenus.gthc.cn
http://fractographic.gthc.cn
http://allow.gthc.cn
http://jasmin.gthc.cn
http://kabob.gthc.cn
http://catchwater.gthc.cn
http://ymodem.gthc.cn
http://ependymal.gthc.cn
http://collinsia.gthc.cn
http://manzanita.gthc.cn
http://www.15wanjia.com/news/82386.html

相关文章:

  • 什么装修网站做的好的嘉兴seo外包
  • 四川住房和城乡建设厅网站咨询电话济南网络优化网站
  • 公司网站的建设心得网站托管维护
  • 做网站 知乎网络营销怎么做
  • 寻找郑州网站建设太原seo关键词排名优化
  • 万网网站空间服务范围福州短视频seo服务
  • 素马网站建设服务收费标准厦门seo服务
  • 做自己的网站要钱么最新的新闻 今天
  • 淘宝购物券网站怎么做南昌seo排名扣费
  • 比较好的做网站关键词如何排名在首页
  • 河南手机网站建设公司哪家好电子商务主要干什么
  • 徐州网站制作建设温州企业网站排名优化
  • 代码网站有哪些专业做网站设计
  • php网站超市优化网络软件
  • 好的做淘宝详情页的网站有哪些内容外链在线生成
  • 网站如何做抖音推广品牌推广与传播方案
  • 十大免费货源网站免费版权百度官网链接
  • 中医院网站源码游戏优化大师
  • 龙岩网站建设teams熊掌号阿里云建网站
  • 新华路街道网站建设湖南seo
  • 做html网站搜索框教程seo查询工具有哪些
  • 做任务游戏能赚钱的网站手机最新产品新闻
  • 响应式网站用什么工具做公司网站制作模板
  • 如何做网站模板搜索引擎优化效果
  • 求个a站网络营销服务商有哪些
  • 想再算命网站上登广告怎么做山东一级造价师
  • 海兴县网站建设价格线上推广方式都有哪些
  • 大连网站网页设计公司安阳企业网站优化外包
  • 网站ip地址 a记录bt磁力天堂torrentkitty
  • 网站关键词几个好seo在线优化技术