#95Easy
Sort three numbers
Time: 1 s · Memory: 256 MB
- Functions
Statement
Write a function SortInc3(a, b, c) that arranges the values of three variables in increasing order: after the call . Use it to sort two triples.
Input format
Two lines, each with three integers (at most in absolute value).
Output format
Two lines: each triple in increasing order.
Examples
Input
3 -1 0 6 5 4
Output
-1 0 3 4 5 6
Input
1 2 3 7 7 7
Output
1 2 3 7 7 7
Note
The function must change the variables themselves: in C++ pass the parameters by reference (long long& a), in Go by pointer (*int64), and in Python return the new values (return a, b, c). Three compare-and-swap steps are enough: , and again.
