Codeforces
CF Step
Youtube Linkedin Discord Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Hints : The 67th Integer Problem

Fix $x$ and think about how $\min(x,y)$ behaves when you increase or decrease $y$. When is it equal to $x$, and when is it equal to $y$?

Answer to Hint 1: If $y \ge x$, then $\min(x,y) = x$. If $y < x$, then $\min(x,y) = y < x$.

So the best you can ever do is $x$, provided you can choose $y$ with $y \ge x$. Are the bounds on $y$ loose enough for that?

Answer to Hint 2: Yes: you may take $y = x$, which lies in $[-67, 67]$ whenever $x$ does.

So the maximum value of $\min(x,y)$ is $x$. The sample I/O reads one integer per test case; output that same integer.