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

公司网站怎么优化中国制造网的网络营销方式

公司网站怎么优化,中国制造网的网络营销方式,上海建定建设工程信息网,用html5的视频网站题意#xff1a;两个人玩游戏#xff0c;通过轮流填数字#xff08;0~9#xff09;#xff0c;若最终左右两边的和相等#xff0c;后手赢#xff0c;否则先手赢。起始有部分数字和空格。 官方题解#xff1a; 题解翻译#xff1a; 让我们把余额表示为左半部分数字和…题意两个人玩游戏通过轮流填数字0~9若最终左右两边的和相等后手赢否则先手赢。起始有部分数字和空格。 官方题解 题解翻译 让我们把余额表示为左半部分数字和右半部分数字和的差。也让我成为最小可能的余额如果我们用00的左半部替换所有的问号和99的右半部分中的所有问号都可以计算让RR成为最大可能的平衡。 当且仅当lr20lr20时第二个玩家获胜。我们就票子上剩下的问号做归纳证明吧。 如果所有的字符都是数字那么第二个玩家只有在票子满意的情况下才能获胜也就是当LR20LR20时。 好吧现在假设问号是偶数现在轮到第一个玩家了。每转一圈R-LR-L的值减小99并且可以将LL设置为从当前LL到L9L9的任意数字。如果lr0lr0那么第一个玩家可以使ll尽可能大并将其设置为l9l9。第二个玩家在回合中能做的最好的事情是将r r设置为r-9r-9保持l l不变lrlr的值将与前两回合相同。LR0LR0的情况也可作类似分析。在lr0lr0的情况下第二个玩家有一个对称的策略。 我的理解类似于巴什博弈考虑后手赢的情况其余情况则为先手赢。 此题要注意两个问题一要填的空格二:起始两边的和的大小 若只考虑后手赢的情况有两个阶段。一两边都有空格时先手为了让自己赢在和大的一边放9后手也只能在和小的这一边放9则两边和差sum空格差k都不变 二只有一边有空格且另一边的和较大因为不知先手放啥特殊放0或9故每一回合k/2保持放九个故只有k/2*9sum时后手才会赢。 Monocarp and Bicarp live in Berland, where every bus ticket consists of nn digits (nn is an even number). During the evening walk Monocarp and Bicarp found a ticket where some of the digits have been erased. The number of digits that have been erased is even. Monocarp and Bicarp have decided to play a game with this ticket. Monocarp hates happy tickets, while Bicarp collects them. A ticket is considered happy if the sum of the first n2n2 digits of this ticket is equal to the sum of the last n2n2 digits. Monocarp and Bicarp take turns (and Monocarp performs the first of them). During each turn, the current player must replace any erased digit with any digit from 00to 99. The game ends when there are no erased digits in the ticket. If the ticket is happy after all erased digits are replaced with decimal digits, then Bicarp wins. Otherwise, Monocarp wins. You have to determine who will win if both players play optimally. Input The first line contains one even integer nn (2≤n≤2⋅105)(2≤n≤2⋅105) — the number of digits in the ticket. The second line contains a string of nn digits and ? characters — the ticket which Monocarp and Bicarp have found. If the ii-th character is ?, then the ii-th digit is erased. Note that there may be leading zeroes. The number of ? characters is even. Output If Monocarp wins, print Monocarp (without quotes). Otherwise print Bicarp (without quotes). Examples Input 4 0523Output BicarpInput 2 ??Output BicarpInput 8 ?054??0?Output BicarpInput 6 ???00?Output MonocarpNote Since there is no question mark in the ticket in the first example, the winner is determined before the game even starts, and it is Bicarp. In the second example, Bicarp also wins. After Monocarp chooses an erased digit and replaces it with a new one, Bicap can choose another position with an erased digit and replace it with the same digit, so the ticket is happy. ac代码 #includestdio.h #includeiostream #includestring.h #includealgorithm using namespace std; const int M2e510; char s[M]; int main() {int n;while(~scanf(%d,n)){int x0,y0,z0,a0,b0,c0;scanf(%s,s1);for(int i1; in/2; i)if(s[i]?)x;elseas[i]-0;for(int in/21; in; i)if(s[i]?)y;elsebs[i]-0;cb-a;zx-y;if(z%2)printf(Monocarp\n);else{z1;//因为不知先手放啥特殊放0或1故每次保持放九个类似巴什博弈if(z*9c)printf(Bicarp\n);elseprintf(Monocarp\n);}}return 0; }
http://www.zqtcl.cn/news/715925/

相关文章:

  • 济南网站建设模板python网站开发用什么软件
  • 北京品牌网站建设阿里巴巴logo图片
  • 做宣传册从哪个网站找素材中文在线っと好きだっ
  • 国际物流东莞网站建设wap是什么意思的缩写
  • 传奇官网百度seo营销网站
  • 如何在导航网站上做链接上海建筑设计研究院
  • 微信营销软件网站建设推广链接
  • 美的集团网站建设方案书广汉做网站
  • 个人博客网站实验报告商标购买网站
  • 2020给个免费网站好人有好报做购物微信网站
  • 做淘宝客网站挣钱济南百度竞价代运营
  • 国外网站404错误页网站地址搜索
  • 做 暧视频在线观看网站北京安卓app开发公司
  • h5哪个网站可以做惠州+企业网站建设
  • 网站运营知识哪个网站可以做免费商业推广
  • 电脑做网站怎么解析域名河南郑州静默管理
  • 项目网站制作冯提莫斗鱼前在哪个网站做直播
  • 网站建设 思路wordpress 访问记录插件
  • 网站建设diyseo课程培训班费用
  • 舞蹈培训东莞网站建设做直播网站
  • app建设网站公司网站制作预算
  • 移动端网站如何开发市辖区郑州网站建设
  • 山东省双体系建设网站wordpress 帮助 主题
  • 手机怎么做三个视频网站网站建设协议一百互联
  • 创建一个网站一般步骤有哪些安徽软件定制开发
  • 网站建设平台协议书模板下载佳木斯建网站的
  • 部队网站建设招标二级域名注册平台
  • 做网站怎么调用栏目织梦搞笑图片网站源码
  • 开个小网站要怎么做南宁seo外包服务商
  • 济宁做网站的企业app网站开发学习