結果

問題 No.1133 キムワイプイーター
ユーザー ohanaohana
提出日時 2023-11-06 11:10:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 77,356 KB
最終ジャッジ日時 2023-11-06 11:10:59
合計ジャッジ時間 4,825 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,496 KB
testcase_01 AC 37 ms
53,496 KB
testcase_02 AC 71 ms
76,068 KB
testcase_03 AC 95 ms
76,648 KB
testcase_04 AC 91 ms
76,756 KB
testcase_05 AC 95 ms
76,840 KB
testcase_06 AC 91 ms
76,656 KB
testcase_07 AC 80 ms
76,648 KB
testcase_08 AC 73 ms
76,284 KB
testcase_09 AC 86 ms
76,440 KB
testcase_10 AC 105 ms
77,356 KB
testcase_11 AC 107 ms
77,044 KB
testcase_12 AC 93 ms
76,816 KB
testcase_13 AC 107 ms
77,044 KB
testcase_14 AC 80 ms
76,432 KB
testcase_15 AC 79 ms
76,440 KB
testcase_16 AC 69 ms
76,100 KB
testcase_17 AC 49 ms
64,204 KB
testcase_18 AC 52 ms
70,348 KB
testcase_19 AC 49 ms
64,204 KB
testcase_20 AC 51 ms
68,300 KB
testcase_21 AC 52 ms
70,348 KB
testcase_22 AC 53 ms
70,348 KB
testcase_23 AC 37 ms
53,496 KB
testcase_24 AC 37 ms
53,496 KB
testcase_25 AC 49 ms
64,204 KB
testcase_26 AC 37 ms
53,496 KB
testcase_27 AC 37 ms
53,496 KB
testcase_28 AC 37 ms
53,496 KB
testcase_29 AC 37 ms
53,496 KB
testcase_30 AC 52 ms
70,348 KB
testcase_31 AC 37 ms
53,496 KB
testcase_32 AC 36 ms
53,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
s = input()

A = [[1 for i in range(n + 1)] for j in range(n + 1)]
A[0][0] = 0

y, x = 0, 0
d = {"R": (0, 1), "L": (0, -1), "U": (1, 0), "D": (-1, 0)}
for c in s:
    y, x = y + d[c][0], x + d[c][1]
    A[y][x] = 0


for a in A[::-1]:
    print(*a)
0