結果

問題 No.1133 キムワイプイーター
ユーザー tsuishitsuishi
提出日時 2020-12-29 15:19:11
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 1,268 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 30,976 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-15 15:56:36
合計ジャッジ時間 2,184 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 5 ms
5,376 KB
testcase_03 AC 13 ms
5,376 KB
testcase_04 AC 13 ms
5,376 KB
testcase_05 AC 14 ms
5,376 KB
testcase_06 AC 12 ms
5,376 KB
testcase_07 AC 10 ms
5,376 KB
testcase_08 AC 7 ms
5,376 KB
testcase_09 AC 10 ms
5,376 KB
testcase_10 AC 15 ms
5,376 KB
testcase_11 AC 14 ms
5,376 KB
testcase_12 AC 13 ms
5,376 KB
testcase_13 AC 14 ms
5,376 KB
testcase_14 AC 8 ms
5,376 KB
testcase_15 AC 7 ms
5,376 KB
testcase_16 AC 7 ms
5,376 KB
testcase_17 AC 3 ms
5,376 KB
testcase_18 AC 5 ms
5,376 KB
testcase_19 AC 3 ms
5,376 KB
testcase_20 AC 4 ms
5,376 KB
testcase_21 AC 5 ms
5,376 KB
testcase_22 AC 5 ms
5,376 KB
testcase_23 AC 1 ms
5,376 KB
testcase_24 AC 1 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 1 ms
5,376 KB
testcase_27 AC 1 ms
5,376 KB
testcase_28 AC 1 ms
5,376 KB
testcase_29 AC 1 ms
5,376 KB
testcase_30 AC 5 ms
5,376 KB
testcase_31 AC 1 ms
5,376 KB
testcase_32 AC 1 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#define DEBUGe

#define NOP do{}while(0)

#ifdef DEBUG
#define TRACE(...) do{printf(__VA_ARGS__);fflush(stdout);}while(0)
#define TRACECR do{printf("\n");fflush(stdout);}while(0)
#else
#define TRACE(...) NOP
#define TRACECR NOP
#endif
#define REP(a,b) for(int a=0;a<(b);++a)
int main( void ) {
    int m,n;
    int x;
    int y;
    char    c;
    int map[201][201];

    scanf("%d %d", &m, &n );
    x = 0;
    y = m;
    REP(j,m+1) {
        REP(i,m+1) {
            map[j][i] = 1;
        }
    }
    map[y][x] = 0;
    REP(i,n) {
        while( (c = fgetc(stdin)) == '\n' );
        switch( c ) {
            case 'U':
                y--;
                map[y][x] = 0;
                break;
            case 'D':
                y++;
                map[y][x] = 0;
                break;
            case 'L':
                x--;
                map[y][x] = 0;
                break;
            case 'R':
                x++;
                map[y][x] = 0;
                break;
            default:
                printf("ERR[%c]\n",c);
                return 1;
        }
    }
    REP(j,m+1) {
        REP(i,m+1) {
            if(i) printf(" ");
            printf("%d",map[j][i]);
        }
        printf("\n");
    }
    return 0;
}
0