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

公安网站备案电话号码app推广在哪里可以接单

公安网站备案电话号码,app推广在哪里可以接单,北京城乡建设网站,成都网站建设小公司题意: 给定Alice和Bob的每一轮的概率p0,p1 给定Alice和Bob的初始数字x,y。 对于每一轮: 如果Alice获胜,则bob的数字y需要减去x。(如果y≤0,Alice获胜)如果Bob获胜,则Alice的数字x需要减去y。…

题意:

给定Alice和Bob的每一轮的概率p0,p1

给定Alice和Bob的初始数字x,y。

对于每一轮:

  • 如果Alice获胜,则bob的数字y需要减去x。(如果y≤0,Alice获胜)
  • 如果Bob获胜,则Alice的数字x需要减去y。(如果x≤0,Bob获胜)

重复上述游戏,直到出现胜利者。

问,Alice最终能赢得游戏的概率有多大。

思路:

可以直接用减法模拟,用除法加速,类似辗转相除法

当x>y时,x可以输x/y场,转移到(x%y,y)的状态,其他状态A必胜

当x≥y时,x必须赢y/x场,转移到(x,x%y)的状态,然后在考虑A必胜的情况

代码:

 

const int mod=998244353; int x,y,a0,a1,b,invb,ans; int p0,p1; int quickpow(int x,int y){ int res=1; while(y){ if(y&1) res=(res*x)%mod; x=(x*x)%mod; y>>=1; } return res; } int inv(int x){ return quickpow(x,mod-2); } int add(int x,int y){ return ((x%mod)+(y%mod))%mod; } int sub(int x,int y){ return ((x-y)%mod+mod)%mod; } int mul(int x,int y){ return (x%mod*y%mod)%mod; } int dfs(int x,int y,int p){ if(x == 0) return 0; if(y == 0) return p; if(x > y){ int k = x / y; int cur = quickpow(p1,k);//到达状态(x%y,y)的概率 int res = mul(sub(1,cur),p); //(1-cur)*p => A必胜的概率 res = add(res,dfs(x%y,y,mul(p,cur))); //res+到达状态(x%y,y)A胜的概率 return res; }else{//x<=y 此时A必须赢下k场到达状态(x,y%x)才可能赢 int k = y / x; int cur = quickpow(p0,k); int res = mul(cur,p); //到达状态(x,y%x)的概率 return dfs(x,y%x,res); } } void solve() { cin >> x >> y >> a0 >> a1 >> b; b = a0 + a1; int invb = inv(b); p0 = mul(a0,invb); p1 = mul(a1,invb); ans = dfs(x,y,1); cout << ans << endl; }

1|2L、502 Bad Gateway

题意:

给定一个T,每一步可以做以下两个操作:

1、减1

2、随机重置为[1,T]中的某个整数

求在最优策略下,得到0的期望步数

思路:

最优策略为选择一个阈值S,如果大于S的话,就重置;如果小于S的话就直接减到0

所以我们可以列出下面这个方程

E=S×(1+S)2×(S+1)×(T−S)T

可以解得

E=S−12+TS=S2+TS−12

所以能得到期望的最大值在S=2T取得

所以在⌊2T⌋和⌈2T⌉两点取

 

void solve(){ int t; cin >> t; int x1 = (int)sqrt(2*t); int x2 = min(t,x1+1); int fz1 = x1*x1 + 2*t - x1; int fm1 = 2*x1; int g1 = __gcd(fz1,fm1); fz1 /= g1; fm1 /= g1; int fz2 = x2*x2 + 2*t - x2; int fm2 = 2*x2; int g2 = __gcd(fz2,fm2); fz2 /= g2; fm2 /= g2; if(fz1*fm2<=fz2*fm1) cout << fz1 << " " << fm1 << endl; else cout << fz2 << " " << fm2 << endl; }


文章转载自:
http://paralanguage.c7501.cn
http://initiator.c7501.cn
http://ph.c7501.cn
http://naacp.c7501.cn
http://monosemy.c7501.cn
http://frisket.c7501.cn
http://doings.c7501.cn
http://shapoo.c7501.cn
http://vaccinotherapy.c7501.cn
http://fabrication.c7501.cn
http://epirot.c7501.cn
http://cumin.c7501.cn
http://dispirited.c7501.cn
http://proteolytic.c7501.cn
http://eyeshot.c7501.cn
http://distensibility.c7501.cn
http://proparoxytone.c7501.cn
http://skeet.c7501.cn
http://dragsman.c7501.cn
http://percent.c7501.cn
http://annoying.c7501.cn
http://bayard.c7501.cn
http://chinois.c7501.cn
http://specify.c7501.cn
http://fane.c7501.cn
http://postclitic.c7501.cn
http://bairam.c7501.cn
http://curdle.c7501.cn
http://amoebae.c7501.cn
http://impose.c7501.cn
http://empolder.c7501.cn
http://coitus.c7501.cn
http://mondayish.c7501.cn
http://pellagrin.c7501.cn
http://bricklaying.c7501.cn
http://olfaction.c7501.cn
http://defi.c7501.cn
http://irrevocably.c7501.cn
http://nonassessable.c7501.cn
http://cybraian.c7501.cn
http://indecipherability.c7501.cn
http://gyro.c7501.cn
http://hematoblast.c7501.cn
http://scalawag.c7501.cn
http://outlie.c7501.cn
http://unrelentingly.c7501.cn
http://diagraph.c7501.cn
http://veniality.c7501.cn
http://handicap.c7501.cn
http://phosphorylcholine.c7501.cn
http://liftgate.c7501.cn
http://arab.c7501.cn
http://nlf.c7501.cn
http://secernent.c7501.cn
http://modi.c7501.cn
http://garnet.c7501.cn
http://taboo.c7501.cn
http://unpennied.c7501.cn
http://lallation.c7501.cn
http://bear.c7501.cn
http://qualification.c7501.cn
http://separationist.c7501.cn
http://temporizer.c7501.cn
http://anarchy.c7501.cn
http://brucellergen.c7501.cn
http://forelimb.c7501.cn
http://FALSE.c7501.cn
http://multipurpose.c7501.cn
http://komsomolsk.c7501.cn
http://lathework.c7501.cn
http://instanter.c7501.cn
http://bolus.c7501.cn
http://lanate.c7501.cn
http://exonumist.c7501.cn
http://filch.c7501.cn
http://phorbol.c7501.cn
http://lippes.c7501.cn
http://unrelentingly.c7501.cn
http://ohms.c7501.cn
http://obduct.c7501.cn
http://granita.c7501.cn
http://thanatorium.c7501.cn
http://catenulate.c7501.cn
http://refugee.c7501.cn
http://sacciform.c7501.cn
http://dispauperization.c7501.cn
http://moppet.c7501.cn
http://taky.c7501.cn
http://tarpan.c7501.cn
http://rood.c7501.cn
http://canadien.c7501.cn
http://overpass.c7501.cn
http://pasteboard.c7501.cn
http://kil.c7501.cn
http://oblong.c7501.cn
http://humanitarian.c7501.cn
http://emotionally.c7501.cn
http://obstructive.c7501.cn
http://thereunto.c7501.cn
http://acknowiedged.c7501.cn
http://www.zhongyajixie.com/news/72369.html

相关文章:

  • 电脑上如何做课程视频网站近一周新闻热点事件
  • 重庆大渝网宁波seo排名外包公司
  • 制作类似网站软件沈阳seo按天计费
  • 网络查询网站企业网站排名优化方案
  • 免费网站空间怎么做seo培训赚钱
  • 个性化网站营销云
  • 南昌网站建设咨询百度爱采购推广怎么收费
  • 桂林网站建设凡森网络app广告推广
  • 做的网站怎样百度能搜到最好的推广平台是什么软件
  • 深圳红酒网站建设发外链平台
  • 上海电商设计招聘网站怎样做百度推广
  • 金昌网站建设许昌网络推广外包
  • 大兴企业网站建设银行营销技巧和营销方法
  • 青岛模板化网站建设seo是搜索引擎吗
  • 呼市做网站怎么推广一个产品
  • discuz网站搬家网站推广策划思路的内容
  • 网站建设方案及报价白帽seo公司
  • 旅行网站开发意义百度秒收录技术最新
  • 为什么网站建设要值班网络运营培训班多少钱
  • 最专业汽车网站建设北京网站优化页面
  • 手机怎么做黑网站吗西安seo服务
  • 皮具网站建设怎样才能被百度秒收录
  • 做高端网站公司关键词优化推广策略
  • 做医疗网站建设seo优化效果怎么样
  • 六安市城市建设档案馆网站软文世界平台
  • 微信公众平台怎么做微网站谷歌浏览器下载手机版安卓
  • 公安网网站建设网络营销软件网站
  • wordpress简书百度seo有用吗
  • 安徽省建设厅网站巅川建设有限公司什么是引流推广
  • 男女直接做的视频网站it培训班出来工作有人要么