Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
26865 | 唐心 | 二维数组最大值 | C++ | Accepted | 2 MS | 732 KB | 425 | 2022-05-24 17:16:24 |
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int fun(int arr[3][4]) { int i,j,max = 0; for(i=0;i<3;i++) { for(j=0;j<4;j++) { if(arr[i][j]>max) max = arr[i][j]; } } return max; } int main() { int arr[3][4],i,j,max; for(i=0;i<3;i++) { for(j=0;j<4;j++) { cin>>arr[i][j]; } } max = fun(arr); cout<<max<<endl; return 0; }