結果

問題 No.1133 キムワイプイーター
ユーザー TnaTna
提出日時 2022-07-13 16:22:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 626 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,992 KB
実行使用メモリ 15,972 KB
最終ジャッジ日時 2023-09-07 02:25:49
合計ジャッジ時間 6,264 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,856 KB
testcase_01 AC 16 ms
7,812 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 208 ms
13,320 KB
testcase_10 AC 313 ms
15,972 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 265 ms
15,220 KB
testcase_14 AC 219 ms
13,632 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 16 ms
7,804 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 16 ms
7,804 KB
testcase_27 WA -
testcase_28 AC 16 ms
7,876 KB
testcase_29 AC 17 ms
7,856 KB
testcase_30 WA -
testcase_31 AC 16 ms
7,852 KB
testcase_32 AC 16 ms
7,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = [int(x) for x in input().split()]
moves = list(input())
maps = []
for i in range(n+1):
    tmp = []
    for j in range(n+1):
        tmp.append("1")
    maps.append(tmp)
# print(maps)

x = y = 0
maps[n-y][n-x] = "0"
for move in moves:
    if move == "U":
        y = y + 1
    elif move == "R":
        x = x + 1
    elif move == "L":
        x = x - 1
    elif move == "D":
        y = y - 1
    maps[n-y][n-x] = "0"
# print(maps)

# maps = map(str, maps)
for i in range(n+1):
    # print(map_row)
    print(" ".join(maps[i]))
    # for map_d in map_row:
    #     # print(map_d)
    #     print("".join(str(map_row)))
0