C. Adidas vs Adivon

Time Limit: 1000ms
Case Time Limit: 1000ms
Memory Limit: 65536KB
64-bit integer IO format: %lld      Java class name: Main
Font Size: 
+
 
-

“我们坐在高高的土堆上面。听妈妈讲阿迪王的事情。我出生在一个不太普通的家庭,妈妈会预知术。在我小的时候,妈妈就常跟我说:‘在未来的世界。有一种叫阿迪王的东西成为比石油、黄金还重要的东西……’那时,我痴痴地听着。一听就到半夜,听到入迷。任由鼻涕流到自己的嘴里。长大后,我最终知道阿迪王是什么东西。它是对于亿万人来说比自身生命还重要的神物……”

就我所知,一双普通的阿迪王人造革鞋的日常维护费就非常惊人了,有些亿万富翁购买了阿迪王的产品后由于不堪负担产品的日常维护费用而宣布个人破产。

“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的更多相关文章

  1. bnu 29378 Adidas vs Adivon 基础题

    Adidas vs Adivon Time Limit: 1000ms Memory Limit: 65536KB   64-bit integer IO format: %lld      Java ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. Singapore retailer will release this adidas NMD R1

    Select spots are restocking the adidas NMD Singapore this Friday, Feb 24th featuring three different ...

  9. 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 ...

随机推荐

  1. Hbase常见异常 分类: B7_HBASE 2015-02-02 16:16 412人阅读 评论(0) 收藏

    1. HBase is able to connect to ZooKeeper but the connection closes immediately hbase(main):001:0> ...

  2. [Vue] Build Vue.js Apps with the Vue-CLI and Nuxt.js

    The vue-cli allows you to easily start up Vue projects from the command line while Nuxt.js enables a ...

  3. Lucene学习总结之三:Lucene的索引文件格式(1) 2014-06-25 14:15 1124人阅读 评论(0) 收藏

    Lucene的索引里面存了些什么,如何存放的,也即Lucene的索引文件格式,是读懂Lucene源代码的一把钥匙. 当我们真正进入到Lucene源代码之中的时候,我们会发现: Lucene的索引过程, ...

  4. js获取滚动条的宽度

    function getScrollWidth() { var noScroll, scroll, oDiv = document.createElement("DIV"); oD ...

  5. 后台报错java.lang.IllegalArgumentException: Invalid character found in the request target.

    报错: Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang ...

  6. 将asp.net core2.0项目部署在IIS上运行

    原文:将asp.net core2.0项目部署在IIS上运行 前言:  与ASP.NET时代不同,ASP.NET Core不再是由IIS工作进程(w3wp.exe)托管,而是独立运行的.它独立运行在控 ...

  7. Hive的日期函数

    1.unix时间戳转时间函数 语法: from_unixtime(bigint unixtime[, string format]) 返回值: string 说明: 转化UNIX时间戳(从1970-0 ...

  8. Oracle数据库零散知识06 -- Package的定义与简单触发器

    CREATE OR REPLACE PACKAGE pak_02 IS--包头 --这里可定义公共参数 FUNCTION fun_01 RETURN NUMBER; PROCEDURE pro_01 ...

  9. 小强的HTML5移动开发之路(24)—— PhoneGap Android开发环境搭建

    有关JDK及Android开发环境的搭建请看我前面的博文:http://blog.csdn.net/dawanganban/article/details/9748497 一.下载PhoneGap 下 ...

  10. 亲测有效,解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/hjf161105/article/details/78850658 最近租了一个阿里云云翼服务器,趁 ...