Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139409 万骏博 二维数组的最大值与最小值 C++ Accepted 0 MS 260 KB 280 2025-12-06 16:52:55

Tests(2/2):


Code:

#include<bits/stdc++.h> using namespace std; int a[10][10],n,o=0,p=10000001; int main(){ scanf("%d",&n); for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ scanf("%d",&a[i][j]); o=max(o,a[i][j]); p=min(p,a[i][j]); } } printf("%d %d",p,o); return 0; }