結果

問題 No.1133 キムワイプイーター
ユーザー dangodango
提出日時 2023-06-24 18:55:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 1,372 ms
コンパイル使用メモリ 86,408 KB
実行使用メモリ 78,624 KB
最終ジャッジ日時 2023-09-14 14:31:58
合計ジャッジ時間 5,662 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,356 KB
testcase_01 AC 75 ms
71,276 KB
testcase_02 AC 103 ms
77,484 KB
testcase_03 AC 117 ms
78,012 KB
testcase_04 AC 116 ms
78,152 KB
testcase_05 AC 116 ms
78,276 KB
testcase_06 AC 116 ms
77,940 KB
testcase_07 AC 111 ms
78,164 KB
testcase_08 AC 102 ms
77,488 KB
testcase_09 AC 114 ms
77,984 KB
testcase_10 AC 123 ms
78,624 KB
testcase_11 AC 123 ms
78,380 KB
testcase_12 AC 118 ms
78,268 KB
testcase_13 AC 122 ms
78,284 KB
testcase_14 AC 105 ms
77,428 KB
testcase_15 AC 107 ms
77,884 KB
testcase_16 AC 103 ms
77,588 KB
testcase_17 AC 85 ms
76,508 KB
testcase_18 AC 88 ms
76,516 KB
testcase_19 AC 86 ms
76,404 KB
testcase_20 AC 87 ms
76,408 KB
testcase_21 AC 89 ms
76,508 KB
testcase_22 AC 90 ms
76,408 KB
testcase_23 AC 75 ms
71,248 KB
testcase_24 AC 73 ms
71,192 KB
testcase_25 AC 85 ms
76,328 KB
testcase_26 AC 75 ms
71,396 KB
testcase_27 AC 74 ms
71,116 KB
testcase_28 AC 74 ms
71,108 KB
testcase_29 AC 73 ms
71,292 KB
testcase_30 AC 88 ms
76,332 KB
testcase_31 AC 74 ms
71,036 KB
testcase_32 AC 75 ms
71,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
S = input()
DP = [[1 for _ in range(N+1)] for _ in range(N+1)]
DP[0][0] = 0
X, Y = 0, 0
for c in S:
    if c == "U":
        Y += 1
    elif c == "R":
        X += 1
    elif c == "L":
        X -= 1
    else:
        Y -= 1
    DP[Y][X] = 0
for i in range(N + 1):
    print(*DP[N - i])
0