結果

問題 No.1133 キムワイプイーター
ユーザー satoyuyapyaasatoyuyapyaa
提出日時 2020-07-27 20:24:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 12,668 KB
最終ジャッジ日時 2023-09-11 05:58:34
合計ジャッジ時間 5,942 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,956 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 249 ms
10,400 KB
testcase_10 AC 391 ms
11,104 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 366 ms
11,600 KB
testcase_14 AC 262 ms
9,340 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 16 ms
7,860 KB
testcase_24 AC 16 ms
7,772 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 16 ms
7,920 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 16 ms
7,892 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
x,y = n,n

kim_pos = {(i,j):True for i in range(x+1) for j in range(y+1)}
#print(board)
s = input()
now_x = 0
now_y = 0
kim_pos[(0,0)] = False
for c in s:
	if  c=="L":
		now_x-=1
	if  c=="R":
		now_x+=1
	if  c=="U":
		now_y+=1
	if  c=="D":
		now_y-=1
	kim_pos[(now_x,now_y)] = False
for i in range(n+1):
		temp = ["1" if kim_pos[(j,i)] else "0" for j in range(n +1)]
		print(" ".join(temp))
	
0