Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
127914 | 田雨欣 | 矩阵行交换 | C++ | Accepted | 1 MS | 260 KB | 457 | 2025-07-30 12:45:05 |
#include<bits/stdc++.h> using namespace std; int n, m, a[6][6], b[6], c[6]; int main() { cin >> m >> n; for (int i = 1; i <= 5; i++) { for (int j = 1; j <= 5; j++) { cin >> a[i][j]; b[j] = a[m][j]; c[j] = a[n][j]; } } for (int j = 1; j <= 5; j++) { a[n][j] = b[j]; a[m][j] = c[j]; } for (int i = 1; i <= 5; i++) { for (int j = 1; j <= 5; j++) { cout << a[i][j] << " "; } cout << endl; } return 0; }