MrMoon is organizing a massive competitive programming and gaming tournament.
To set up the gaming stations, he needs to assemble complete gamepads. A complete gamepad set consists of exactly one Left Controller and exactly one Right Controller.Currently, MrMoon has counted $$$x$$$ Left Controllers and $$$y$$$ Right Controllers in his inventory.
Determine the maximum number of complete gamepad sets MrMoon can assemble for the tournament.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases.
Each test case consists of a single line containing two integers $$$x$$$ and $$$y$$$ ($$$0 \le x, y \le 10^{18}$$$) — the number of Left Controllers and the number of Right Controllers, respectively.
For each test case, output a single integer — the maximum number of complete gamepad sets possible.
45 310 100 51000000000000000000 999999999999999999
3 10 0 999999999999999999
| Contests - ACM Student Chapter - PSUT |
|---|
| Закрытая |
| Зритель |
| GJU JCPC Qualification 2026 |
|---|
| Закончено |
| Название |
|---|


