Run ID:151760

提交时间:2026-04-18 15:26:27

#include<bits/stdc++.h> using namespace std; int main() { long long s,a[11][11],d,f; cin>>s; for(int i=1;i<=s;i++){ for(int j=1;j<=s;j++){ cin>>a[i][j]; } } d=f=a[1][1]; for(int i=1;i<=s;i++){ for(int j=1;j<=s;j++){ if(a[i][j]>d)d=a[i][j]; if(a[i][j]<f)f=a[i][j]; } } cout<<f<<" "<<d; return 0; }