矩阵strassen算法按照伪代码打的代码运行不了

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
#include<iostream>
using namespace std;
#define size 4
void add(int a[][size], int b[][size], int c[][size], int n) {
    for (int i = 0;i < n;i++) {
        for (int j = 0;j < n;j++) {
            c[i][j] = a[i][j] + b[i][j];
        }
    }
}
void substract(int a[][size], int b[][size], int c[][size], int n) {
    for (int i = 0;i < n;i++) {
        for (int j = 0;j < n;j++) {
            c[i][j] = a[i][j] -b[i][j];
        }
    }
}void Multiply( int A[][size],int  B[][size],  int C[][size]) {
    for (int i = 0; i < 2; i++)
        for (int j = 0; j < 2; j++)
        {
            C[i][j] = 0;
            for (int k = 0; k < 2; k++)
                C[i][j] += A[i][k] * B[k][j];
        }
}
void Strassen(int A[][size], int B[][size], int C[][size], int n) {
    int A11[size][size], A12[size][size], A21[size][size], A22[size][size];
    int B11[size][size], B12[size][size], B21[size][size], B22[size][size];
    int C11[size][size], C12[size][size], C21[size][size], C22[size][size];
    int M1[size][size], M2[size][size], M3[size][size], M4[size][size], M5[size][size], M6[size][size], M7[size][size];
    int BB[size][size], AA[size][size];
    if (n == 2) {
        Multiply(A, B, C);
    }
    else {
        for (int i = 0;i <n/ 2;i++) {
            for (int j = 0;j <n/2;j++) {
                A11[i][j] = A[i][j];
                A12[i][j] = A[i][j + n / 2];
                A21[i][j] = A[i + n / 2][j];
                A22[i][j] = A[i + n / 2][j + n / 2];
                B11[i][j] = B[i][j];
                B12[i][j] = B[i][j + n / 2];
                B21[i][j] = B[i + n / 2][j];
                B22[i][j] = B[i + n / 2][j + n / 2];
            }
        }
        substract(B12, B22, BB, n / 2);//p1
        Strassen(A11, BB, M1, n / 2);

        add(A11, A12, AA, n / 2);
        Strassen(AA, B22, M2, n / 2);

        add(A21, A22, AA, n / 2);
        Strassen(AA, B11, M3, n / 2);

        substract(B21, B11, BB, n / 2);
        Strassen(A22, BB, M4, n / 2);

        add(A11, A22, AA, n / 2);
        add(B11, B22, BB, n / 2);
        Strassen(AA, BB, M5, n / 2);

        substract(A11, A22, AA, n / 2);
        add(B21, B22, BB, n / 2);
        Strassen(AA, BB, M6, n / 2);

        substract(A11, A21, AA, n / 2);
        add(B11, B12, BB, n / 2);
        Strassen(AA, BB, M7, n / 2);

        add(M5, M4, AA, n / 2);
        substract(M6, M2, BB, n / 2);
        add(AA, BB, C11, n / 2);
        
        add(M1, M2, C12, n / 2);

        add(M3, M4, C21, n / 2);

        substract(M5, M3, AA, n / 2);
        substract(M1, M7, BB, n / 2);
        add(AA, BB, C22, n / 2);
        for (int i = 0; i < n / 2; i++)
        {
            for (int j = 0; j < n / 2; j++)
            {
                C[i][j] = C11[i][j];
                C[i][j + n / 2] = C12[i][j];
                C[i + n / 2][j] = C21[i][j];
                C[i + n / 2][j + n / 2] = C22[i][j];
            }
        }
    }
}
int main() {
    int A[size][size] = { {5, 2, 6, 1}, {0, 6, 2, 0}, {3, 8, 1, 4}, {1, 8, 5, 6} }; //input(A, size)
    int B[size][size] = { {7, 5, 8, 0}, {1, 8, 2, 6}, {9, 4, 3, 8}, {5, 3, 7, 9} }; //input(B, size)
    int C[size][size] = {};
    Strassen(A, B, C, size);
    for (int i = 0;i < 1;i++) {
        for (int j = 0;j < 1;j++) {
            cout << C[i][j]<<" ";
        }
        cout << endl;
    }
    return 0;
}

运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果