結果

問題 No.1133 キムワイプイーター
ユーザー akitsugu777akitsugu777
提出日時 2020-12-02 16:42:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 611 ms / 2,000 ms
コード長 399 bytes
コンパイル時間 589 ms
コンパイル使用メモリ 10,924 KB
実行使用メモリ 23,792 KB
最終ジャッジ日時 2023-10-11 11:46:32
合計ジャッジ時間 8,517 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,812 KB
testcase_01 AC 16 ms
7,832 KB
testcase_02 AC 168 ms
12,444 KB
testcase_03 AC 401 ms
19,080 KB
testcase_04 AC 411 ms
19,108 KB
testcase_05 AC 447 ms
20,540 KB
testcase_06 AC 425 ms
18,996 KB
testcase_07 AC 276 ms
15,448 KB
testcase_08 AC 155 ms
12,468 KB
testcase_09 AC 365 ms
17,804 KB
testcase_10 AC 611 ms
23,792 KB
testcase_11 AC 517 ms
22,188 KB
testcase_12 AC 440 ms
19,384 KB
testcase_13 AC 526 ms
22,980 KB
testcase_14 AC 404 ms
18,340 KB
testcase_15 AC 259 ms
14,948 KB
testcase_16 AC 168 ms
12,392 KB
testcase_17 AC 22 ms
8,620 KB
testcase_18 AC 31 ms
8,808 KB
testcase_19 AC 22 ms
8,632 KB
testcase_20 AC 28 ms
8,736 KB
testcase_21 AC 31 ms
8,740 KB
testcase_22 AC 32 ms
8,816 KB
testcase_23 AC 16 ms
7,812 KB
testcase_24 AC 15 ms
7,860 KB
testcase_25 AC 21 ms
8,568 KB
testcase_26 AC 16 ms
7,820 KB
testcase_27 AC 15 ms
7,884 KB
testcase_28 AC 16 ms
7,920 KB
testcase_29 AC 16 ms
7,944 KB
testcase_30 AC 32 ms
8,776 KB
testcase_31 AC 16 ms
7,860 KB
testcase_32 AC 15 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

L = [[1]*(n+1) for _ in range(n+1)]
# print(L)

x = 0
y = 0
Lx = [0]
Ly = [0]
for s in S:
    if s == 'R':
        x += 1
    elif s == 'L':
        x -= 1
    elif s == 'U':
        y += 1
    else:
        y -= 1
    Lx += [x]
    Ly += [y]

# print(Lx)
# print(Ly)

for i, j in zip(Lx, Ly):
    L[j][i] = 0
# print(L)

for i in L[::-1]:
    print(*i)
0