結果

問題 No.1133 キムワイプイーター
ユーザー 👑 KazunKazun
提出日時 2020-07-29 02:16:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 555 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 78,616 KB
最終ジャッジ日時 2023-09-11 07:02:15
合計ジャッジ時間 5,764 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,284 KB
testcase_01 AC 76 ms
71,240 KB
testcase_02 AC 98 ms
77,308 KB
testcase_03 AC 111 ms
77,952 KB
testcase_04 AC 111 ms
78,016 KB
testcase_05 AC 112 ms
78,184 KB
testcase_06 AC 109 ms
77,692 KB
testcase_07 AC 102 ms
78,008 KB
testcase_08 AC 97 ms
77,416 KB
testcase_09 AC 104 ms
77,912 KB
testcase_10 AC 115 ms
78,616 KB
testcase_11 AC 115 ms
78,356 KB
testcase_12 AC 112 ms
77,968 KB
testcase_13 AC 115 ms
78,488 KB
testcase_14 AC 102 ms
77,588 KB
testcase_15 AC 102 ms
77,780 KB
testcase_16 AC 98 ms
77,496 KB
testcase_17 AC 79 ms
75,808 KB
testcase_18 AC 81 ms
75,808 KB
testcase_19 AC 79 ms
75,656 KB
testcase_20 AC 79 ms
75,660 KB
testcase_21 AC 82 ms
75,384 KB
testcase_22 AC 81 ms
75,780 KB
testcase_23 AC 76 ms
71,384 KB
testcase_24 AC 76 ms
71,312 KB
testcase_25 AC 79 ms
75,792 KB
testcase_26 AC 76 ms
71,272 KB
testcase_27 AC 75 ms
71,384 KB
testcase_28 AC 75 ms
71,100 KB
testcase_29 AC 75 ms
71,196 KB
testcase_30 AC 80 ms
75,820 KB
testcase_31 AC 74 ms
71,372 KB
testcase_32 AC 76 ms
71,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
S=input()

T=[[1]*(N+1) for _ in range(N+1)]
X,Y=0,0

T[0][0]=0
for s in S:
    if s=="U":
        Y+=1
    elif s=="R":
        X+=1
    elif s=="L":
        X-=1
    else:
        Y-=1
    T[Y][X]=0

U=[]
for x in T[::-1]:
    U.append(" ".join(map(str,x)))

print("\n".join(map(str,U)))
0