結果

問題 No.1133 キムワイプイーター
ユーザー matriematrie
提出日時 2020-12-20 00:31:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 281 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 629 ms
コンパイル使用メモリ 11,932 KB
実行使用メモリ 18,176 KB
最終ジャッジ日時 2023-10-21 09:51:54
合計ジャッジ時間 5,511 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,108 KB
testcase_01 AC 31 ms
10,108 KB
testcase_02 AC 106 ms
12,364 KB
testcase_03 AC 202 ms
15,200 KB
testcase_04 AC 208 ms
15,576 KB
testcase_05 AC 217 ms
15,724 KB
testcase_06 AC 210 ms
15,512 KB
testcase_07 AC 152 ms
13,620 KB
testcase_08 AC 102 ms
12,084 KB
testcase_09 AC 192 ms
15,184 KB
testcase_10 AC 281 ms
18,176 KB
testcase_11 AC 254 ms
17,280 KB
testcase_12 AC 218 ms
15,780 KB
testcase_13 AC 268 ms
17,280 KB
testcase_14 AC 198 ms
15,496 KB
testcase_15 AC 148 ms
13,500 KB
testcase_16 AC 102 ms
12,264 KB
testcase_17 AC 37 ms
10,548 KB
testcase_18 AC 47 ms
10,716 KB
testcase_19 AC 37 ms
10,536 KB
testcase_20 AC 43 ms
10,640 KB
testcase_21 AC 47 ms
10,716 KB
testcase_22 AC 48 ms
10,728 KB
testcase_23 AC 30 ms
10,108 KB
testcase_24 AC 30 ms
10,108 KB
testcase_25 AC 37 ms
10,536 KB
testcase_26 AC 30 ms
10,108 KB
testcase_27 AC 30 ms
10,108 KB
testcase_28 AC 31 ms
10,108 KB
testcase_29 AC 30 ms
10,108 KB
testcase_30 AC 47 ms
10,732 KB
testcase_31 AC 31 ms
10,108 KB
testcase_32 AC 31 ms
10,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
s=list(input())
f=[[1]*(n+1) for _ in [0]*(n+1)]
x,y,f[0][0]=0,0,0
for d in s:
	if   d=='U': y+=1
	elif d=='R': x+=1
	elif d=='L': x-=1
	elif d=='D': y-=1
	f[y][x]=0
for a in reversed(f): print(*a)
0