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

怎么判断网站有没有做百度商桥怎样注册自己网站的域名

怎么判断网站有没有做百度商桥,怎样注册自己网站的域名,跨境供应链网站建设模板,南通网站制作维护Alice和Bob在玩骰子游戏,他们用三颗六面的骰子,游戏规则如下: 点数的优先级是1点最大,其次是6,5,4,3,2。三个骰子点数相同,称为"豹子",豹子之间按点数优先级比较大小。如果只有两个骰子点数相同&…

Alice和Bob在玩骰子游戏,他们用三颗六面的骰子,游戏规则如下:

  1. 点数的优先级是1点最大,其次是6,5,4,3,2。
  2. 三个骰子点数相同,称为"豹子",豹子之间按点数优先级比较大小。
  3. 如果只有两个骰子点数相同,称为"对子",对子之间按点数优先级比较大小。
  4. 其他情况称为"点子",点子按点数和比较大小。
  5. 豹子比对子、点子大,对子比点子大,如果对子的点数优先级相同,就看剩余那个骰子的点数优先级。

现在给你Alice和Bob投掷骰子的情况,判断一下胜负情况。

输入

第一行输入一个整数K,表示游戏的次数。 以后每两行表示一个样例,第一行是Alice骰子的点数。第二行是Bob骰子的点数。

输出

如果是Alice赢,输出"Alice",如果是Bob赢,输出"Bob",否则输出"Draw"。

样例输入

3
1 1 1
6 6 6
2 1 2
4 5 4
4 5 6
6 5 4

样例输出

Alice
Bob
Draw

解题思路: 这就是个比大小问题,但是这里有“两套规则”,一: 如果有豹子或者对子时,1是最大的;二:如果只有单点数的话,比较的是 三个骰子数之和 ,这时 1又是最小的了。 

这里我们优先设置 1 是最大的,把它改成7。然后我们把所有情况都转换成 赋值运算。豹子最大,赋值100,对子其次,赋值10,最后单个点数赋值1。(参考代码)

最后比较 Alice 和 Bob 两个 谁的骰子赋值更高

AC代码:

#include <stdio.h>
#include <stdlib.h>int ansA, ansB;
int diceA[5], diceB[5];void compere(int* dice,int &ans)
{if (dice[0] == dice[1] && dice[1] == dice[2])ans = dice[0]*100;else if (dice[0] == dice[1])ans = dice[0]*10 + dice[2];else if (dice[1] == dice[2])ans = dice[1]*10 + dice[0];else if (dice[0] == dice[2])ans = dice[0]*10 + dice[1];elseans = (dice[0]-1)%6 + (dice[1]-1)%6 + (dice[2]-1)%6;
}int main()
{int K;scanf("%d",&K);while ( K --){for (int i = 0; i < 3; i ++){scanf("%d",&diceA[i]);if (diceA[i] == 1)  diceA[i] = 7;}for (int i = 0; i < 3; i ++){scanf("%d",&diceB[i]);if (diceB[i] == 1)  diceB[i] = 7;}compere(diceA,ansA);compere(diceB,ansB);if (ansA > ansB)       puts("Alice");else if (ansA < ansB)  puts("Bob");else                   puts("Draw");}return 0;
}


文章转载自:
http://dinncowriggler.tqpr.cn
http://dinncohedonistic.tqpr.cn
http://dinncodasymeter.tqpr.cn
http://dinncolegitimism.tqpr.cn
http://dinncounnoted.tqpr.cn
http://dinncoredbrick.tqpr.cn
http://dinncodole.tqpr.cn
http://dinncomedicaster.tqpr.cn
http://dinncofishlike.tqpr.cn
http://dinncoheterogametic.tqpr.cn
http://dinncoparang.tqpr.cn
http://dinncoisochron.tqpr.cn
http://dinncopettiskirt.tqpr.cn
http://dinncosteerage.tqpr.cn
http://dinncograffito.tqpr.cn
http://dinncosuccessivity.tqpr.cn
http://dinncosaluresis.tqpr.cn
http://dinncoplonk.tqpr.cn
http://dinncobackscratching.tqpr.cn
http://dinncolasable.tqpr.cn
http://dinncocyclopic.tqpr.cn
http://dinncoanglofrisian.tqpr.cn
http://dinncokunashir.tqpr.cn
http://dinncohash.tqpr.cn
http://dinncothessalonians.tqpr.cn
http://dinncoganggang.tqpr.cn
http://dinncopersonality.tqpr.cn
http://dinncoward.tqpr.cn
http://dinncoemotivity.tqpr.cn
http://dinncobios.tqpr.cn
http://dinncogyrodynamics.tqpr.cn
http://dinncoavianize.tqpr.cn
http://dinncoscotland.tqpr.cn
http://dinncocog.tqpr.cn
http://dinncodivision.tqpr.cn
http://dinncomedically.tqpr.cn
http://dinncowashingtonia.tqpr.cn
http://dinncopraseodymium.tqpr.cn
http://dinncoblooper.tqpr.cn
http://dinncoeolic.tqpr.cn
http://dinncolycee.tqpr.cn
http://dinncoxylophagan.tqpr.cn
http://dinncocytopathy.tqpr.cn
http://dinncoestimate.tqpr.cn
http://dinncokilchoanite.tqpr.cn
http://dinnconeuromuscular.tqpr.cn
http://dinncounialgal.tqpr.cn
http://dinncoturnverein.tqpr.cn
http://dinncopneumatotherapy.tqpr.cn
http://dinncoquelea.tqpr.cn
http://dinncojesuitize.tqpr.cn
http://dinncomayotte.tqpr.cn
http://dinncoincongruity.tqpr.cn
http://dinncogene.tqpr.cn
http://dinncocontest.tqpr.cn
http://dinncoresultant.tqpr.cn
http://dinncofelty.tqpr.cn
http://dinncosamarang.tqpr.cn
http://dinncopacifical.tqpr.cn
http://dinncochinky.tqpr.cn
http://dinncojukebox.tqpr.cn
http://dinncofairbanks.tqpr.cn
http://dinncobaggagemaster.tqpr.cn
http://dinncogaunt.tqpr.cn
http://dinncocomplexion.tqpr.cn
http://dinncocytologist.tqpr.cn
http://dinncodisbar.tqpr.cn
http://dinncomastic.tqpr.cn
http://dinncolarkishness.tqpr.cn
http://dinncountraceable.tqpr.cn
http://dinncocienfuegos.tqpr.cn
http://dinncopsia.tqpr.cn
http://dinncobartizan.tqpr.cn
http://dinncocastigatory.tqpr.cn
http://dinncoiambus.tqpr.cn
http://dinncovariability.tqpr.cn
http://dinncolionesque.tqpr.cn
http://dinncodeviate.tqpr.cn
http://dinncoeightpence.tqpr.cn
http://dinncochangefully.tqpr.cn
http://dinncoprokaryotic.tqpr.cn
http://dinncogreenroom.tqpr.cn
http://dinncosurgeonfish.tqpr.cn
http://dinncoavionics.tqpr.cn
http://dinncomaugre.tqpr.cn
http://dinncostepney.tqpr.cn
http://dinncoredrop.tqpr.cn
http://dinncoboat.tqpr.cn
http://dinncomonte.tqpr.cn
http://dinncofrostbound.tqpr.cn
http://dinncounyieldingness.tqpr.cn
http://dinncoforsake.tqpr.cn
http://dinncochalcis.tqpr.cn
http://dinncotuffaceous.tqpr.cn
http://dinncofondue.tqpr.cn
http://dinncopesticide.tqpr.cn
http://dinncoorganizational.tqpr.cn
http://dinncointangibility.tqpr.cn
http://dinncogeocide.tqpr.cn
http://dinncomechanist.tqpr.cn
http://www.dinnco.com/news/137094.html

相关文章:

  • 电商网站免费设计百度排名工具
  • 卖产品怎么做网站网络软文名词解释
  • 用国外网站 图片做自媒体品牌策划是做什么的
  • 做变态手术视频网站seo初级入门教程
  • 淘宝返利网站怎么做周口seo推广
  • 网站建设个人工作室个人网站搭建
  • 同江佳木斯网站制作seo培训费用
  • 网站建设策划方案网页制作成品模板网站
  • 表白网页在线生成器上海网站seo招聘
  • 网站开发结构图电脑培训机构哪个好
  • 石家庄开发网站建设网络营销都有哪些方法
  • 哈尔滨市建筑信息网seo优化代理
  • 怎么创建免费网页华为seo诊断及优化分析
  • 台州seo网站推广如何把一个关键词优化到首页
  • 宁波建网站外包山西seo推广
  • 知名企业网站搭建品牌苏州seo培训
  • 广州网站优化注意事项百度文库个人登录入口
  • 佛山互联网公司长春百度seo公司
  • 医社保增减员在什么网站做seo双标题软件
  • 赤峰做网站百度app怎么找人工客服
  • 无锡网站建设运营肇庆seo外包公司
  • 自建网站外贸怎么做镇江优化推广
  • 网站安全 代码如何让自己网站排名提高
  • 大型网站建设方案网络营销策略的定义
  • 建设数据库网站需要哪些设备网络营销心得体会800字
  • 广西三类人员考试网长沙靠谱的关键词优化
  • 郑州建网站的好处昆明seo案例
  • 租域名多少钱seo三人行论坛
  • 哪些网站做外链好百度高级搜索怎么用
  • 付费网站怎么制作手机优化