这编译错误是啥意思
查看原帖
这编译错误是啥意思
273896
L_Hospital_楼主2020/8/27 14:56

https://www.luogu.com.cn/record/37727916

# include <iostream>
# include <cmath>
using namespace std;

bool b[1025][1025] = {};

void solve(int a, int b, int c)
{
    if (c == 1)
        return;
    for (int i = a; i <= c / 2; i++)
        for (int j = b; j <= c / 2; j++)
            b[i][j] = true;
    solve(a, b + c / 2, c / 2);
    solve(a + c / 2, b, c / 2);
    solve(a + c / 2, b + c / 2, c / 2);
}

int main()
{
    int n;
    cin >> n;
    int t = pow(2, n);
    solve(1, 1, t);
    for (int i = 1; i <= t; i++)
    {
        for (int j = 1; j <= t; j++)
            cout << !b[i][j] << " ";
        cout << endl;
    }
}
2020/8/27 14:56
加载中...