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)

20240907初赛模拟练习(全体入门组)

未参加
状态
已结束
规则
OI
题目
20
开始于
2024-9-7 9:00
结束于
2024-9-7 22:00
持续时间
13 小时
主持人
参赛人数
56