StoneHaos

851

Nov 3rd, 2019
160
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //851
  2. #include <cstdio>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. int main(void) {
  7.     freopen("input.txt", "r", stdin);
  8.     freopen("output.txt", "w", stdout);
  9.  
  10.     int n;
  11.     scanf("%d", &n);
  12.     int out[n];
  13.     for (int i = 0; i < n; ++ i) {
  14.         int m = 0, a;
  15.         for (int j = 0; j < 6; ++ j) {
  16.             scanf("%d", &a);
  17.             if (a > m) m = a;
  18.         }
  19.         out[i] = m;
  20.     }
  21.     sort(out, out + n);
  22.     for (int i = n - 1; i >= 0; -- i)
  23.         printf("%d", out[i]);
  24.     printf("\n");
  25.     return 0;
  26. }
RAW Paste Data