結果

問題 No.1133 キムワイプイーター
ユーザー TnaTna
提出日時 2022-07-13 16:35:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 298 ms / 2,000 ms
コード長 656 bytes
コンパイル時間 365 ms
コンパイル使用メモリ 10,828 KB
実行使用メモリ 15,976 KB
最終ジャッジ日時 2023-09-07 02:41:48
合計ジャッジ時間 5,234 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,804 KB
testcase_01 AC 15 ms
7,864 KB
testcase_02 AC 87 ms
10,480 KB
testcase_03 AC 201 ms
13,408 KB
testcase_04 AC 210 ms
13,592 KB
testcase_05 AC 216 ms
13,820 KB
testcase_06 AC 211 ms
13,724 KB
testcase_07 AC 138 ms
11,748 KB
testcase_08 AC 81 ms
10,148 KB
testcase_09 AC 184 ms
13,200 KB
testcase_10 AC 298 ms
15,976 KB
testcase_11 AC 252 ms
15,228 KB
testcase_12 AC 200 ms
13,900 KB
testcase_13 AC 251 ms
15,152 KB
testcase_14 AC 189 ms
13,708 KB
testcase_15 AC 128 ms
11,480 KB
testcase_16 AC 85 ms
10,220 KB
testcase_17 AC 18 ms
8,340 KB
testcase_18 AC 19 ms
8,236 KB
testcase_19 AC 17 ms
8,232 KB
testcase_20 AC 19 ms
8,416 KB
testcase_21 AC 19 ms
8,208 KB
testcase_22 AC 20 ms
8,360 KB
testcase_23 AC 16 ms
7,804 KB
testcase_24 AC 15 ms
7,840 KB
testcase_25 AC 17 ms
8,260 KB
testcase_26 AC 16 ms
7,768 KB
testcase_27 AC 16 ms
7,868 KB
testcase_28 AC 15 ms
7,828 KB
testcase_29 AC 16 ms
7,876 KB
testcase_30 AC 20 ms
8,628 KB
testcase_31 AC 15 ms
7,828 KB
testcase_32 AC 16 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""
NG
"""
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][x] = "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][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