热门

最新

红包

立Flag

投票

同城

我的

发布
deligent_torche
郊眠寺山雀
4 年前
truedeligent_torche

查找 力扣 38 88 217 219 278 349 350 373 374 378
海贼oj 274

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
关于鞍点的简单求法:#include <iostream>using namespace std;#define n 4int main(){ /********* Begin *********/ int a[n][n],b[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> a[i][j]; } } int r,l,max,k=1; for (int i = 0; i < n; i++) { max = a[i][0]; for (int j = 0; j < n; j++) { if (a[i][j] > max) { max = a[i][j], l = j; } } for (int j = 0; j < n; j++) { if (a[i][j] == max) { b[i][j] = max; } } } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (b[i][j]==a[i][j]&& b[i][j] <=a[0][j] && b[i][j] <=a[1][j] && b[i][j] <= a[2][j] && b[i][j] <= a[3][j]) { cout << "[" << i << "]" << "[" << j << "]" << "=" << b[i][j] << endl; } } } /********* End *********/ return 0;}
立即登录