CF1729A Two Elevators

题目描述

现在 Vlad 在一楼,他需要等电梯。公寓有两台电梯。第一台在 $a$ 楼,第二台在 $b$ 楼驶向 $c$ 楼。(若 $b$ $=$ $1$ ,Vlad 也上不了电梯)此时呼叫第一台电梯可以使电梯立刻从 $a$ 楼下来,呼叫第二台电梯可以使电梯先上 $c$ 楼,再下来。已知他们速度均为每秒一层楼,求哪辆电梯来得快。

输入格式

有 $t$ 组数据,每组有 $a$ $b$ $c$ 三个变量(数据 $\le$ $10^{8}$)

输出格式

共 $t$ 行,每行输出 $1$ $2$ $3$ 中的一个,$1$ 代表第一个电梯较快,$2$ 代表第二个电梯较快,$3$ 代表两个电梯一样快。

说明/提示

In the first test case of the example, the first elevator is already on the floor of $ 1 $ . In the second test case of the example, when called, the elevators would move as follows: - At the time of the call, the first elevator is on the floor of $ 3 $ , and the second one is on the floor of $ 1 $ , but is already going to another floor; - in $ 1 $ second after the call, the first elevator would be on the floor $ 2 $ , the second one would also reach the floor $ 2 $ and now can go to the floor $ 1 $ ; - in $ 2 $ seconds, any elevator would reach the floor $ 1 $ . In the third test case of the example, the first elevator will arrive in $ 2 $ seconds, and the second in $ 1 $ .