| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 63289 | 何冠宇 | 二维数组的最大值与最小值 | C++ | Accepted | 2 MS | 268 KB | 330 | 2024-01-07 10:47:48 |
#include <bits/stdc++.h>. using namespace std; int main () { int n,mx = 1,d = 2e9; cin>>n; int a[10][10]; for(int i = 0;i < n;i++){ for(int j = 0;j < n;j++){ cin>>a[i][j]; if(mx < a[i][j]){ mx = a[i][j]; }if(d > a[i][j]){ d = a[i][j]; } } } cout << d <<" "<<mx; return 0; }