ac

fgjpokyug  •  3个月前


include <bits/stdc++.h>

using namespace std;

int main() {

int a[10][10], m, n;
for (int i = 1; i <= 5; i++) {
	for (int j = 1; j <= 5; j++) {
		cin >> a[i][j];
	}
}
cin >> m >> n;
for (int i = 1; i <= 5; i++) {
	a[6][i] = a[m][i];
	a[m][i] = a[n][i];
	a[n][i] = a[6][i];
}
for (int i = 1; i <= 5; i++) {
	for (int j = 1; j <= 5; j++) {
		cout << a[i][j]<<" ";
	}
	cout << endl;
}
return 0;

}


评论:

请先登录,才能进行评论