C. Adidas vs Adivon

C. Adidas vs Adivon

Time Limit: 1000ms

Case Time Limit: 1000ms

Memory Limit: 65536KB

64-bit integer IO format: %lld      Java class name: Main

Submit Status PID:
29378

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");
    }
}

时间: 2025-01-06 16:00:35

C. Adidas vs Adivon的相关文章

组队赛#2解题总结

比赛链接:click here~~ A BNU ACM校队时间安排,模拟自能 手速题: #include <iostream> #include <stdio.h> #include <math.h> #include <string.h> #include <algorithm> using namespace std; int main() { int t; scanf("%d", &t); while (t--)

Singapore retailer will release this adidas NMD R1

Select spots are restocking the adidas NMD Singapore this Friday, Feb 24th featuring three different choices from the famous silhouette in most-Solar Red, Core Black, and Clean White-colored options certain to please individuals individuals that over

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 the NMD R1. The sneaker has a knitted black upper with matching black Three Stripes. A success of red and black is positioned using the silhouettes sign

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 Originals retailers worldwide. It's the identical colorway because the original - a good black Primeknit upper supported through the signature blue and red

adidas yeezy 350 V2 Beluga Performance Reviews,what dou you thing?

New yeezys 2017 Boost hand to today has been almost two weeks. Continued their own never signed a good tradition, registered 12 stores are still empty-handed and return. Even if the amount of big, face black, or not! So on the 28th night in Ebay foun

adidas Crazy Explosive 2017 Primeknit performance reviews

Before I get into this review, I just want to say that theadidas yeezy boost 350 V2 for salePrimeknit is my favorite hoop shoe (as of right now) of 2017 — by a wide margin! YOU CAN FIND THE ADIDAS CRAZY EXPLOSIVE 2017 PK AVAILABLE AT EASTBAY.COM STAR

The adidas NMD XR1 singapore is a bit more cool

The adidas NMD Singapore continues to be the right silhouette for summer time because of a mix of a breathable, lightweight (and often woven) upper and also the patented Boost cushioning system that's helped revitalize both trefoil brand's running an

The Adidas Dame 4 Deconstructed Report

One of my favorite basketball shoes of 2017 is the Dame 4. It took the attributes that worked really well from the Dame 2 and 3 and carried them over to the 4 while reducing the bulk. It shows the lines refinement and fluid transition from one model

Where have the cheapest adidas Yeezy Boost 350 V2

For fans of the adidas Yeezy 350 for sale, this Holiday season we have a large lineup set to take place. A total of three will launch known as the ‘Beluga 2.0’, ‘Blue Tint’ and ’Semi Frozen Yellow’. Looks like adidas will be changing around the month