文章
34
粉丝
316
获赞
10
访问
24.2k
#include<bits/stdc++.h>
using namespace std;
//对矩阵进行转置
void TM(vector<vector<int>>& m1, int n)
{
//先将m1转置
int temp;
for (int index = 0; index < n; index++)
for (int i = index; i < n; i++, index++)
for (int j = index; j < n; j++)
{//进行交换
temp = m1[i][j];
m1[i][j] = m1[j][i];
m1[j][i] = temp;
}
}
//对矩阵进行对称交换
void Swap(vector<vector<int>>& m1, int n)
{
int temp;
for (int i = 0; i < n...
登录后发布评论
暂无评论,来抢沙发