Master Zhu and Video

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Master Zhu is watching a video. He wants to adjust the sound volume from pp dB to qq dB. Master Zhu is powerful enough to control the sound volume mentally. He needs one second to issue one order. So, each second, he may either issue an order "Up!", issue an order "Down!", or do nothing.

If he issues an order "Up!", the volume increases by 11 dB. An order "Down!" works in a more compilcated way: if on the previous second, there was an order "Down!" and the volume decreased by xx dB, it decreases by 2x2 \cdot x dB, otherwise the volume decreases by 11 dB.

If after some order the volume becomes negative, the system will break, so Master Zhu must be careful.

Find the minimum time needed for Master Zhu to adjust the volume from pp dB to qq dB.

입력

The first line of input contains one integer TT, the number of test cases (1T31051 \le T \le 3 \cdot 10^5).

Each of the next TT lines contains two integers pp and qq (0p,q1090 \le p, q \le 10^9).

출력

For each test case, print a single line with a single integer: the minimum time in seconds Master Zhu needs to adjust the volume.