多组输入, 每组输入一行.
第一行输入两个整数,
, 分别表示带上黑色项圈的猫猫个数和白色项圈的猫猫个数.
Multiple groups of input, each group has only contain one lines.
First line input two integer,
, denote the number of black collar cat and white collar cat.
对于每组输出样例输出一行.
第一行输出一个整数, 表示自系项圈起
天后所有的猫猫都会得到面包
For each case contain one line.
First line output a integer, denote all cats will receive bread after
days since the collar was attached
来自青菜的提示(觉得自己贼厉害的同学可以不用看提示自己想噢i)
这是关于样例的生动讲解啦啦啦:
第一次系项圈的时候,只有两只猫分别戴着两种不同颜色的项圈,戴黑项圈猫猫看到只有一只戴着白色项圈的猫猫,就知道自己戴的肯定是黑色项圈了(看题干黑体字),所以后1天早上就吃上了面包,这被戴着白色项圈的猫猫看见了,于是他当晚也能说出自己戴的是白色项圈,于是在第2天也吃上了面包,所以答案是2.
第二次系项圈的时候,有三只猫A、B、C,其中A、B被系上了黑色项圈,C被系上了白色项圈,刚系上时,A和B看对方都有黑色项圈所以不确定自己的项圈是什么颜色,C更是一脸懵逼(因为他看到了俩黑色帽子),所以当晚没猫猫去猜自己项圈的颜色,第一天早上也就没有猫猫吃到面包,这时候A和B想,如果自己戴的是白色项圈,那么对方看见的都只有白色项圈,那么他昨天晚上就会猜出自己的项圈颜色今早就有面包吃,而事情却并非如此,所以他们立马明白了自己戴的是黑色项圈,而看到了俩黑色项圈的C依旧一脸懵逼;第二天早上A、B自然吃上了面包,而机智的C也发觉到了事情的真相,自己戴的是白项圈,于是在第三天也吃上了面包~Tips from the Vege
(Students who think they are a good thief can think oh I without looking at the prompt)
Here's a lively explanation of the sample la la la la:
Is a collar for the first time, only two cats were wearing two different colors of collar, wearing a black collar cat saw only one wearing white collars cat cat, is certainly knew their wearing black collar (see dry bolded text), so after 1 day morning eat the bread, it was wearing white collars cat cat saw, So he was able to say that he was wearing a white collar that night, so he ate bread the next day, so the answer is 2.
Department of the second collar, there are three cats A, B, C, among them A and B are tied on the black collar, C was tied on the white collar, first, A and B look at each other with A black collar so not sure what color are his collar, but also A face of meng C (because he saw two black hat), so the evening didn't cat cat to guess the color of the collar, First day in the morning there would be no cat cat to eat bread, then A and B, if I wore A white collar, then each other to see only A white collar, then yesterday evening he will guess his collar color today have bread to eat, and things are not, so they immediately understand oneself wore A black collar, C, who saw two black collars, was still confused; The next morning, A and B ate bread of course, but C also found out the truth of the matter, wearing A white collar, so on the third day also ate bread ~
对于所有测试点有:For all test points there are: