#include <iostream>
using namespace std;
int main()
{
int m,n,i,j,u=1,v=1;
cin>>m>>n;
int a[m][n];
for (i=1;i<=m;i++)
for (j=1;j<=n;j++)
cin>>a[i][j];
for (i=1;i<=m;i++)
{
for (j=1;j<=n;j++)
cout<<a[i][j]<<" ";
cout<<endl;
}
int val_max=a[1][1]; //se recomanda a se lua prima valore ca un maxim;
for (i=1;i<=m;i++)
for (j=1;j<=n;j++)
if (a[i][j]>val_max)
{
val_max = a[i][j];
u = i;
v = j;
}
cout<<val_max<<" pe linia "<<u<<" si coloana "<<v;
return 0;
}
Sper că te-am ajutat, coroană? :)