//Patriche Robert Cosmin
#include <iostream>
using namespace std;

void separaPariDispariCalcoli(int matrice[4][4], int righe, int colonne) {
    int pari[16], dispari[16];
    int countPari = 0, countDispari = 0;
    int sommaPari = 0, maxDispari = INT_MIN;

    for (int i = 0; i < righe; i++) {
        for (int j = 0; j < colonne; j++) {
            if (matrice[i][j] % 2 == 0) {
                pari[countPari++] = matrice[i][j];
                sommaPari += matrice[i][j];
            } else {
                dispari[countDispari++] = matrice[i][j];
                if (matrice[i][j] > maxDispari) {
                    maxDispari = matrice[i][j];
                }
            }
        }
    }

    cout << "Somma dei pari: " << sommaPari << endl;
    cout << "Massimo dei dispari: " << maxDispari << endl;
}

int main() {
    int matrice[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
    separaPariDispariCalcoli(matrice, 4, 4);
    return 0;
}
