CF1558A Charmed by the Game
题目描述
Alice 和 Borys 在打网球。
网球比赛有很多局,每局有一个人发球,有一个人接发球。这样轮流交换,一人一局。
每局比赛都有一个胜者,如果胜者是发球者,那么称为保发,反之称为破发。
我们知道 Alice 赢了 $a$ 局,Borys 赢了 $b$ 局,但我们不知道谁先发球和每局谁赢了。
问所有可能的总破发次数。
输入格式
无
输出格式
无
说明/提示
In the first test case, any number of breaks between $ 0 $ and $ 3 $ could happen during the match:
- Alice holds serve, Borys holds serve, Alice holds serve: $ 0 $ breaks;
- Borys holds serve, Alice holds serve, Alice breaks serve: $ 1 $ break;
- Borys breaks serve, Alice breaks serve, Alice holds serve: $ 2 $ breaks;
- Alice breaks serve, Borys breaks serve, Alice breaks serve: $ 3 $ breaks.
In the second test case, the players could either both hold serves ( $ 0 $ breaks) or both break serves ( $ 2 $ breaks).
In the third test case, either $ 2 $ or $ 3 $ breaks could happen:
- Borys holds serve, Borys breaks serve, Borys holds serve, Borys breaks serve, Borys holds serve: $ 2 $ breaks;
- Borys breaks serve, Borys holds serve, Borys breaks serve, Borys holds serve, Borys breaks serve: $ 3 $ breaks.