結果

問題 No.1133 キムワイプイーター
ユーザー 双六双六
提出日時 2020-08-19 01:34:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 554 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 82,196 KB
実行使用メモリ 77,800 KB
最終ジャッジ日時 2024-04-20 08:06:00
合計ジャッジ時間 2,971 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
54,212 KB
testcase_01 AC 37 ms
54,596 KB
testcase_02 AC 64 ms
76,516 KB
testcase_03 AC 72 ms
77,168 KB
testcase_04 AC 72 ms
77,252 KB
testcase_05 AC 74 ms
77,508 KB
testcase_06 AC 77 ms
77,360 KB
testcase_07 AC 68 ms
77,312 KB
testcase_08 AC 62 ms
77,052 KB
testcase_09 AC 71 ms
77,216 KB
testcase_10 AC 79 ms
77,800 KB
testcase_11 AC 79 ms
77,532 KB
testcase_12 AC 73 ms
77,552 KB
testcase_13 AC 79 ms
77,300 KB
testcase_14 AC 61 ms
76,848 KB
testcase_15 AC 65 ms
77,220 KB
testcase_16 AC 63 ms
77,316 KB
testcase_17 AC 44 ms
66,444 KB
testcase_18 AC 49 ms
71,768 KB
testcase_19 AC 45 ms
66,532 KB
testcase_20 AC 48 ms
69,252 KB
testcase_21 AC 49 ms
71,900 KB
testcase_22 AC 47 ms
72,892 KB
testcase_23 AC 35 ms
53,856 KB
testcase_24 AC 34 ms
54,724 KB
testcase_25 AC 45 ms
67,316 KB
testcase_26 AC 35 ms
53,956 KB
testcase_27 AC 35 ms
54,020 KB
testcase_28 AC 35 ms
54,660 KB
testcase_29 AC 36 ms
53,664 KB
testcase_30 AC 47 ms
72,212 KB
testcase_31 AC 38 ms
53,964 KB
testcase_32 AC 37 ms
54,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N, M = getlist()
	s = input()
	table = [[1] * (N + 1) for i in range(N + 1)]
	x = 0; y = N
	table[y][x] = 0
	for i in s:
		if i == "U":
			y -= 1
		elif i == "D":
			y += 1
		elif i == "L":
			x -= 1
		else:
			x += 1
		table[y][x] = 0

	for i in range(N + 1):
		print(*table[i])



if __name__ == '__main__':
	main()
0