結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,948 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 189 ms
8,688 KB
testcase_03 AC 441 ms
9,612 KB
testcase_04 AC 432 ms
9,328 KB
testcase_05 AC 475 ms
9,764 KB
testcase_06 AC 455 ms
9,300 KB
testcase_07 AC 298 ms
9,128 KB
testcase_08 AC 166 ms
8,772 KB
testcase_09 AC 417 ms
9,504 KB
testcase_10 AC 666 ms
10,776 KB
testcase_11 AC 591 ms
9,860 KB
testcase_12 AC 460 ms
9,776 KB
testcase_13 AC 574 ms
10,660 KB
testcase_14 AC 431 ms
9,344 KB
testcase_15 AC 277 ms
9,416 KB
testcase_16 AC 180 ms
8,832 KB
testcase_17 AC 21 ms
8,584 KB
testcase_18 AC 31 ms
8,736 KB
testcase_19 AC 21 ms
8,452 KB
testcase_20 AC 27 ms
8,724 KB
testcase_21 AC 30 ms
8,696 KB
testcase_22 AC 31 ms
8,748 KB
testcase_23 AC 15 ms
7,948 KB
testcase_24 AC 16 ms
7,832 KB
testcase_25 AC 21 ms
8,508 KB
testcase_26 AC 16 ms
7,804 KB
testcase_27 AC 16 ms
7,796 KB
testcase_28 AC 16 ms
7,816 KB
testcase_29 AC 16 ms
7,800 KB
testcase_30 AC 31 ms
8,852 KB
testcase_31 AC 16 ms
7,884 KB
testcase_32 AC 16 ms
7,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
n+=1
x=y=0
vis=[[1]*n for i in range(n)]
vis[0][0]=0
for c in input():
    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