1389C.cpp 368 B

12345678910111213141516171819202122232425
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. int a, b, c;
  5. cin >> a >> b >> c;
  6. int x, y, z;
  7. x = a;
  8. if(b < x) {
  9. x = b;
  10. }
  11. if(c < x) {
  12. x = c;
  13. }
  14. z = a;
  15. if(b > z) {
  16. z = b;
  17. }
  18. if(c > z) {
  19. z = c;
  20. }
  21. y = a + b + c - x - z;
  22. cout << x << " " << y << " " << z;
  23. return 0;
  24. }