結果

問題 No.1133 キムワイプイーター
ユーザー 37zigen37zigen
提出日時 2020-08-04 20:08:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 625 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,972 KB
実行使用メモリ 10,456 KB
最終ジャッジ日時 2023-10-12 21:31:16
合計ジャッジ時間 8,216 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,984 KB
testcase_01 AC 16 ms
7,840 KB
testcase_02 AC 180 ms
8,816 KB
testcase_03 AC 436 ms
9,368 KB
testcase_04 AC 452 ms
9,416 KB
testcase_05 AC 483 ms
9,424 KB
testcase_06 AC 451 ms
9,468 KB
testcase_07 AC 296 ms
9,056 KB
testcase_08 AC 173 ms
8,816 KB
testcase_09 AC 403 ms
9,272 KB
testcase_10 AC 625 ms
9,820 KB
testcase_11 AC 566 ms
10,456 KB
testcase_12 AC 476 ms
9,420 KB
testcase_13 AC 586 ms
10,356 KB
testcase_14 AC 457 ms
9,408 KB
testcase_15 AC 277 ms
9,040 KB
testcase_16 AC 177 ms
8,828 KB
testcase_17 AC 22 ms
8,608 KB
testcase_18 AC 30 ms
8,856 KB
testcase_19 AC 21 ms
8,576 KB
testcase_20 AC 27 ms
8,624 KB
testcase_21 AC 30 ms
8,856 KB
testcase_22 AC 31 ms
8,832 KB
testcase_23 AC 15 ms
7,816 KB
testcase_24 AC 15 ms
7,828 KB
testcase_25 AC 20 ms
8,520 KB
testcase_26 AC 15 ms
7,940 KB
testcase_27 AC 15 ms
7,872 KB
testcase_28 AC 16 ms
7,784 KB
testcase_29 AC 16 ms
7,852 KB
testcase_30 AC 31 ms
8,748 KB
testcase_31 AC 16 ms
7,916 KB
testcase_32 AC 15 ms
7,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
n+=1
s=input()
x=y=0
vis=[[1]*n for i in range(n)]
vis[0][0]=0
for c in s:
    if c=='R':
        x+=1
    elif c=='L':
        x-=1
    elif c=='U':
        y+=1
    elif c=='D':
        y-=1
    if 0<=x<n and 0<=y<n:
        vis[y][x]=max(vis[y][x]-1,0)
for i in range(n):
    print(*vis[n-1-i])
0