矩阵 重温

备忘:构造单位矩阵 ,多加 m=n

如下:

struct mp
{
    int n, m;
    long long a[N][M];
    void init(int row, int col, bool isI)
    {
        n=row, m=col;
        memset(a, 0, sizeof a);
        if (isI)
        {
        	m=n;
        	for (int i=1; i<=row; i++) a[i][i]=1;
		}
    }
}A, B, ans;

  

posted @ 2025-06-11 13:29  cn是大帅哥886  阅读(5)  评论(0)    收藏  举报