結果

問題 No.1133 キムワイプイーター
ユーザー roarisroaris
提出日時 2020-07-27 22:18:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 458 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 78,664 KB
最終ジャッジ日時 2023-09-11 06:03:58
合計ジャッジ時間 5,396 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,276 KB
testcase_01 AC 76 ms
70,908 KB
testcase_02 AC 106 ms
77,392 KB
testcase_03 AC 116 ms
78,144 KB
testcase_04 AC 118 ms
78,072 KB
testcase_05 AC 118 ms
78,144 KB
testcase_06 AC 116 ms
78,032 KB
testcase_07 AC 109 ms
78,456 KB
testcase_08 AC 103 ms
77,536 KB
testcase_09 AC 113 ms
78,024 KB
testcase_10 AC 123 ms
78,664 KB
testcase_11 AC 122 ms
78,348 KB
testcase_12 AC 116 ms
78,252 KB
testcase_13 AC 123 ms
78,360 KB
testcase_14 AC 105 ms
77,608 KB
testcase_15 AC 106 ms
78,120 KB
testcase_16 AC 104 ms
77,724 KB
testcase_17 AC 87 ms
76,256 KB
testcase_18 AC 89 ms
76,580 KB
testcase_19 AC 86 ms
76,308 KB
testcase_20 AC 87 ms
76,516 KB
testcase_21 AC 89 ms
76,420 KB
testcase_22 AC 88 ms
76,232 KB
testcase_23 AC 76 ms
71,496 KB
testcase_24 AC 76 ms
71,092 KB
testcase_25 AC 87 ms
76,512 KB
testcase_26 AC 77 ms
71,156 KB
testcase_27 AC 77 ms
70,940 KB
testcase_28 AC 76 ms
71,092 KB
testcase_29 AC 76 ms
71,364 KB
testcase_30 AC 86 ms
76,264 KB
testcase_31 AC 74 ms
71,216 KB
testcase_32 AC 73 ms
71,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
s = input()
ans = [[1]*(n+1) for _ in range(n+1)]
ans[n][0] = 0
x, y = 0, 0

for si in s:
    if si=='U':
        y += 1
    elif si=='D':
        y -= 1
    elif si=='R':
        x += 1
    else:
        x -= 1
    
    ans[n-y][x] = 0

for ans_i in ans:
    print(*ans_i)
0