| Contests - ACM Student Chapter - PSUT |
|---|
| Private |
| Spectator |
| PSUT Marathon 2025 |
|---|
| Finished |
This contest uses time limits scaling policy (depending on a programming language). The system automatically adjusts time limits by the following multipliers for some languages. Despite scaling (adjustment), the time limit cannot be more than 30 seconds. Read the details by the link.
Mario is optimizing the track layout for the next Honeymoon Grand Prix!
He's found a flat, rectangular section of the track measuring $$$x$$$ units long and $$$y$$$ units wide.
He wants to install the largest possible square boost pad entirely within this rectangular section to give racers an extra burst of speed. He is interested in the area of the pad.
Mario's Boost Pad. Given the dimensions $$$x$$$ and $$$y$$$ of the rectangular section, what is the side length of the largest square boost pad Mario can install?
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.
Each of the next $$$t$$$ lines contains two integers $$$x$$$ and $$$y$$$ ($$$1 \le x, y \le 10^3$$$) — the dimensions of the rectangular section of the track.
For each test case, print a single integer — the maximum possible area of the square boost pad.
31 15 37 7
1 9 49
| Name |
|---|

