C. Adidas vs Adivon
C. Adidas vs Adivon
cid=5202#" class="submitprob button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="margin:0px 0.1em 0px -1px; padding:0px; text-decoration:none; font-family:'Trebuchet MS',Helvetica,Arial,sans-serif; font-size:1.1em; border:1px solid rgb(204,204,204); background-color:rgb(238,238,238); font-weight:bold; color:rgb(68,68,68); display:inline-block; position:relative; zoom:1; overflow:visible">Submit
Status PID:29378
+
-
“我们坐在高高的土堆上面。听妈妈讲阿迪王的事情。我出生在一个不太普通的家庭,妈妈会预知术。在我小的时候,妈妈就常跟我说:‘在未来的世界。有一种叫阿迪王的东西成为比石油、黄金还重要的东西……’那时,我痴痴地听着。一听就到半夜,听到入迷。任由鼻涕流到自己的嘴里。长大后,我最终知道阿迪王是什么东西。它是对于亿万人来说比自身生命还重要的神物……”
就我所知,一双普通的阿迪王人造革鞋的日常维护费就非常惊人了,有些亿万富翁购买了阿迪王的产品后由于不堪负担产品的日常维护费用而宣布个人破产。
“I'm coming!!!”
可是,Adidas这个从来没有听过的牌子竟然告Adivon商标侵权了!
。这是Adivon粉丝们不能容忍的!!!所以在一个夜黑风高的晚上,一位高贵的Adivon粉丝与还有一位Adidas屌丝约战于华山之巅。作为21世纪的新青年,他们选择了智力对抗,来一局博弈定胜负。
他们拿出了一张长和宽都是正整数的纸片,每次,当前一方能够选择将纸片水平或竖直撕成相等的两半(平行于长边或宽边)。扔掉一半。可是要求撕完后剩下的那部分纸片长和宽依然是正整数。直到有一方不能再撕,该方即输掉这场博弈。
Adivon的粉丝那是相当大度的。所以每次都是Adidas屌丝先手。
Input
第一行一个整数N(2<=N<=2000),表示他们进行了多少局博弈。
接下来N行,每行两个正整数L和H(1<=L,H<=1000000)。表示该局纸片的初始长宽。
Output
对于每一局游戏,输出一行。假设Adivon粉丝胜利则输出"Adivon prevails"。否则Adivon粉丝将发动神技。改变游戏结局,此种情况输出"Adidas loses".
Sample Input
2
1 2
2 2
Sample Output
Adidas loses
Adivon prevails
#include<stdio.h>
int main()
{
int n,a,b,k;
scanf("%d",&n);
while(n--)
{
scanf("%d%d",&a,&b);
k=0;
while(a%2==0)
{
k++; a/=2;
}
while(b%2==0)
{
k++; b/=2;
}
if(k%2==0)printf("Adivon prevails\n");
else printf("Adidas loses\n");
}
}
版权声明:本文博客原创文章,博客,未经同意,不得转载。
C. Adidas vs Adivon的更多相关文章
- bnu 29378 Adidas vs Adivon 基础题
Adidas vs Adivon Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld Java ...
- Which adidas NMD Singapore is your favorite
The adidas NMD Singapore just keeps the hits coming this fall with another change that's sure to bec ...
- The adidas NMD Singapore is one of the brands top selling
Like pointed out, we've two adidas NMD Singapore releases using the first arriving Blue and Black as ...
- The adidas NMD Camo Singapore consists of four colorways
Next within the popular selection of the adidas NMD Singapore is really a clean all-black form of th ...
- The same month as the adidas NMD Singapore is releasing
Earlier this December 2017, the inaugural adidas NMD Singapore silhouette released in the first colo ...
- Check out our list of adidas NMD Singapore retailers
The adidas NMD Singapore is confirmed to produce on The month of january 14th at select adidas Origi ...
- What do you think the coming adidas NMD Singapore
adidas NMD Singapore is surprising everybody with a lot of completely new NMD choices combined with ...
- Singapore retailer will release this adidas NMD R1
Select spots are restocking the adidas NMD Singapore this Friday, Feb 24th featuring three different ...
- Know that more adidas NMD Singapore colorways are coming
The adidas NMD Singapore continues to be the right silhouette for summer time because of a mix of a ...
随机推荐
- ZOJ-1649 Rescue BFS (HDU 1242)
看题传送门: ZOJ http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1649 HDU http://acm.hdu.edu. ...
- [Javascript] Validate Data with the Every() Method
The every method returns true or false based on whether or not every item in the array passes the co ...
- LIVE555源代码研究之四:MediaServer (一)
LIVE555源代码研究之四:MediaServer (一) 从本篇文章開始我们将从简单server程序作为突破点,深入研究LIVE555源代码. 从前面的文章我们知道.不论什么一个基于LIVE555 ...
- php修改SESSION的有效生存时间
如何修改SESSION的生存时间 我们来手动设置 Session 的生存期: <?phpsession_start(); // 保存一天 $lifeTime = 24 * 3600; setco ...
- ZOJ 3168 Sort ZOJ7 水
再水一发,舍友肿么还在睡T T. ---------------------------------舍友还在睡觉的分割线--------------------------------- http:/ ...
- ios开发核心动画七:核心动画与UIView动画的区别
/** UIView与核心动画区别?(掌握) 1.核心动画只作用在layer. 2.核心动画看到的都是假像,它并没有去修改UIView的真实位置. 什么时候使用核心动画? 1.当不需要与用户进行交互, ...
- Html中CSS之去除li前面的小黑点,和ul、LI部分属性方法
对于很多人用div来做网站时,总会用到,但在显示效果时前面总是会有一个小黑点,这个令很多人头痛,但又找不到要源,其它我们可以用以下方法来清除.1.在CSS中写入代码.找到相关性的CSS,在..li和. ...
- 浅谈struts2的国际化----i18n
可能大家在使用struts框架的时候,偶尔会看到这个词: i18n.也就是 Internationalization i 开头,n 结尾. 总共18个字母,今天的主要内容就是环绕这 四个字母. ...
- 【u007】血色先锋队
Time Limit: 1 second Memory Limit: 128 MB [问题描述] 巫妖王的天灾军团终于卷土重来,血色十字军组织了一支先锋军前往诺森德大陆对抗天灾军团,以及一切沾有亡灵气 ...
- SpringSecurity3.2.5自己定义角色及权限的教程
近期阴差阳错的搞上了SpringSecurity3.由于是自己做的小系统.中间遇到了非常多坑,基本每一个坑都踩过了,网上也查了不少资料,发现有不少错误的.更是让我绕了一圈又一圈,如今把一些主要的东西总 ...