Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1437 吴奕希 二维数组的最大值与最小值 C++ Wrong Answer 0 MS 256 KB 535 2023-09-30 16:34:27

Tests(0/2):


Code:

# include<iostream> # include<cmath> using namespace std; int main() { int n,big = 0,small = 2147483647; cin >> n; n--; int b[n][n]; for(int y = 0; y <= n; y++) { for(int x = 0; x <= n; x++) { cin >> b[x][y]; if(b[x][y] > big) { big = b[x][y]; } else if(b[x][y] < small) { small = b[x][y]; } } } printf("%d %d", small); return 0; }


Run Info:

------Input------
3 1 2 3 4 5 6 7 8 9
------Answer-----
1 9
------Your output-----
2147483647 10