P1326 Football
Description
Many of us love Chinese football; we all know the rules of the Chinese Super League (CSL):
In a match, if you win (i.e., your goals are strictly greater than your opponent's), you get $3$ points; if you draw (i.e., your goals equal your opponent's), you get $1$ point; if you lose (i.e., your goals are strictly less than your opponent's), you get $0$ points.
This problem is simple: suppose over $N$ rounds you scored $S$ goals in total and conceded $T$ goals. What are the maximum and minimum points you could possibly obtain?
Input Format
Multiple test cases. Each test case contains one line with three integers $S, T, N$ ($10^9 \ge S, T \ge 0$, $10^9 \ge N \ge 1$). There are at most $3 \times 10^4$ test cases per test point.
Output Format
For each test case, output one line with two integers: the maximum points and the minimum points.
Explanation/Hint
Translated by ChatGPT 5