fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. long long a[100][100];
  5. long long b[100];
  6. for(int i = 1; i <= 12; ++i){
  7. for(int j = 1; j <= 3; ++j){
  8. cin >> a[i][j];
  9. }
  10. }
  11. long long max=a[1][1];
  12. for(int j = 1; j <= 12; ++j){
  13. for(int i = 1; i <= 3; ++i){
  14. if(a[j][i] > max)max = a[j][i];
  15. }
  16. }
  17. cout << max;
  18. return 0;
  19. }
Success #stdin #stdout 0s 4508KB
stdin
1 1 1 
2 2 2
3 3 3
4 4 4
1 1 1 
11 1 1
3 3 3 
8 8 8 
9 9 9
4 4 4
6 6 6
2 2 2
stdout
11