F.cpp 408 B

12345678910111213141516171819202122232425
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int a[3][4];
  5. for(int i = 0; i < 3; i++){
  6. for(int j = 0; j < 4; j++){
  7. cin >> a[i][j];
  8. }
  9. }
  10. int Max = a[0][0];
  11. int r = 0, c = 0;
  12. for(int i = 0; i < 3; i++){
  13. for(int j = 0; j < 4; j++){
  14. if(a[i][j] > Max){
  15. Max = a[i][j];
  16. r = i;
  17. c = j;
  18. }
  19. }
  20. }
  21. cout << Max << endl;
  22. cout << c+1 << endl;
  23. cout << r+1 << endl;
  24. return 0;
  25. }