結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
70,776 KB
testcase_01 AC 77 ms
71,164 KB
testcase_02 AC 97 ms
77,192 KB
testcase_03 AC 108 ms
77,328 KB
testcase_04 AC 109 ms
77,268 KB
testcase_05 AC 112 ms
77,464 KB
testcase_06 AC 112 ms
77,708 KB
testcase_07 AC 104 ms
77,760 KB
testcase_08 AC 99 ms
77,028 KB
testcase_09 AC 107 ms
77,268 KB
testcase_10 AC 117 ms
78,140 KB
testcase_11 AC 116 ms
77,964 KB
testcase_12 AC 111 ms
77,456 KB
testcase_13 AC 115 ms
77,900 KB
testcase_14 AC 105 ms
77,272 KB
testcase_15 AC 104 ms
77,196 KB
testcase_16 AC 100 ms
76,948 KB
testcase_17 AC 82 ms
75,364 KB
testcase_18 AC 82 ms
75,232 KB
testcase_19 AC 80 ms
75,480 KB
testcase_20 AC 81 ms
75,156 KB
testcase_21 AC 83 ms
75,228 KB
testcase_22 AC 80 ms
75,220 KB
testcase_23 AC 78 ms
70,844 KB
testcase_24 AC 76 ms
71,080 KB
testcase_25 AC 80 ms
75,412 KB
testcase_26 AC 76 ms
70,868 KB
testcase_27 AC 76 ms
71,304 KB
testcase_28 AC 76 ms
70,896 KB
testcase_29 AC 77 ms
70,980 KB
testcase_30 AC 83 ms
75,292 KB
testcase_31 AC 76 ms
70,904 KB
testcase_32 AC 75 ms
71,028 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