結果

問題 No.1133 キムワイプイーター
ユーザー osrgy01osrgy01
提出日時 2021-06-24 14:18:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 386 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 13,312 KB
最終ジャッジ日時 2024-06-25 07:29:12
合計ジャッジ時間 6,445 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
xy=[[1]*(n+1) for _ in range(n+1)]
y,x=n,0
xy[y][x]=0
d={i:j for i,j in zip('UDRL',[(-1,0),(1,0),(0,1),(0,-1)])}
for i in input():
    ty,tx=d[i]
    y+=ty;x+=tx
    xy[y][x]=0
[print(*i) for i in xy]
0