#322. CSP2019PJ-19

CSP2019PJ-19

  1. (完善程序)

img

#include<cstdio>
using namespace std;
int n;
const int max_size = 1 << 10;
int res[max_size][max_size];

void recursive(int x,int y, int n, int t)
{
    if(n == 0)
    {
        res[x][y] = _________________________;
    }
    int step = 1 << (n - 1);
    recursive(_________________________, n - 1, t);
    recursive(x, y + step, n - 1, t);
    recursive(x + step, y, n - 1, t);
    recursive(_________________________, n - 1, !t);
}
int main()
{
    scanf("%d", &n);
    recursive(0, 0, _________________________);
    int size = _________________________;
    for(int i = 0; i < size; ++i)
    {
        for(int j = 0; j < size; ++j)
            printf("%d", res[i][j]);
        puts("");
    }
    return 0;
}

① 处应填( )。

{{ select(1) }}

  • n % 2
  • 0
  • t
  • 1

② 处应填( )。

{{ select(2) }}

  • x - step, y - step
  • x, y - step
  • x - step, y
  • x, y

③ 处应填( )。

{{ select(3) }}

  • x - step, y - step
  • x + step, y + step
  • x - step, y
  • x, y - step

④ 处应填( )。

{{ select(4) }}

  • n - 1, n % 2
  • n, 0
  • n, n % 2
  • n - 1, 0

⑤ 处应填( )。

{{ select(5) }}

  • 1 << (n + 1)
  • 1 << n
  • n + 1
  • 1 << (n - 1)