| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 151761 | 杜禹轩 | 二维数组的最大值与最小值 | C++ | Accepted | 1 MS | 272 KB | 370 | 2026-04-18 15:26:45 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a[11][11],d=0,x=1001; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; } } d=x=a[1][1]; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(x>a[i][j])x=a[i][j]; if(d<a[i][j])d=a[i][j]; } } cout<<x<<" "<<d; return 0; }