C语言,不知道为啥加载不出来,dl可以教一下吗?

P1319 压缩技术

Langrange2021 @ 2022-09-11 12:41:39

#include <stdio.h>
int main()
{
    int N;
    scanf("%d", &N);
    int map[201][201];
    int number;
    int count = 0;
    int co = 0;
    int x = 1, y = 1;
    while (scanf("%d", &number) != EOF)
    {
        count++;
        if (count % 2 == 1)
        {
            for (int i = 1; i <= number; i++)
            {
                co++;
                if (co % N != 1)
                {
                    map[x][y] = 0;
                    y++;
                }
                else
                {
                    y = 1;
                    x++;
                    map[x][y] = 0;
                }
            }
        }
        else if (count % 2 == 0)
        {
            for (int i = 1; i <= number; i++)
            {
                co++;
                if (co % N != 1)
                {
                    map[x][y] = 1;
                    y++;
                }
                else
                {
                    y = 1;
                    x++;
                    map[x][y] = 1;
                }
           }
        }
    }
    for (int kx = 1; kx <= N; kx++)
    {
        for (int ky = 1; ky <= N; ky++)
        {
            printf("%d", map[kx][ky]);
        }
        printf("\n");
    }
    return 0;
}

by LGSTZ798932 @ 2022-09-11 12:52:57

@Langrange2021 可以加载,我试了一下: WA WA WA WA WA WA AC WA WA WA WA


by Langrange2021 @ 2022-09-11 15:13:46

@LGSTZ798932 可是为什么不对呢,我也不知道。我是用编译器编译了一下发现加载不出来。 dl可以解释一下吗?


by LGSTZ798932 @ 2022-09-17 21:27:02

@Langrange2021 刷新一下,或把网重连一下


|