結果

問題 No.1133 キムワイプイーター
ユーザー syunsukesyunsuke
提出日時 2020-11-02 08:45:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 78,996 KB
最終ジャッジ日時 2023-09-29 11:44:15
合計ジャッジ時間 6,010 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,320 KB
testcase_01 AC 72 ms
71,256 KB
testcase_02 AC 109 ms
77,844 KB
testcase_03 AC 131 ms
78,108 KB
testcase_04 AC 140 ms
78,288 KB
testcase_05 AC 136 ms
78,508 KB
testcase_06 AC 136 ms
78,368 KB
testcase_07 AC 120 ms
78,340 KB
testcase_08 AC 105 ms
77,968 KB
testcase_09 AC 136 ms
78,092 KB
testcase_10 AC 160 ms
78,996 KB
testcase_11 AC 146 ms
78,672 KB
testcase_12 AC 136 ms
78,468 KB
testcase_13 AC 147 ms
78,780 KB
testcase_14 AC 121 ms
77,760 KB
testcase_15 AC 114 ms
78,376 KB
testcase_16 AC 106 ms
77,520 KB
testcase_17 AC 82 ms
76,512 KB
testcase_18 AC 86 ms
76,524 KB
testcase_19 AC 82 ms
76,528 KB
testcase_20 AC 83 ms
76,292 KB
testcase_21 AC 85 ms
76,760 KB
testcase_22 AC 84 ms
76,716 KB
testcase_23 AC 71 ms
71,324 KB
testcase_24 AC 72 ms
71,384 KB
testcase_25 AC 84 ms
76,344 KB
testcase_26 AC 72 ms
71,484 KB
testcase_27 AC 71 ms
71,380 KB
testcase_28 AC 72 ms
71,648 KB
testcase_29 AC 71 ms
71,260 KB
testcase_30 AC 85 ms
76,516 KB
testcase_31 AC 72 ms
71,292 KB
testcase_32 AC 70 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
L=[[1 for i in range(N+1)]for j in range(N+1)]
L[0][0]=0
#print(L)
D={}
D["U"]=(1,0)
D["D"]=(-1,0)
D["R"]=(0,1)
D["L"]=(0,-1)

P=[0,0]

S=input()
for i in range(M):
    P=[P[0]+D[S[i]][0],P[1]+D[S[i]][1]]
    L[P[0]][P[1]]=0
#print(L)
for i in range(N+1):
    print(*L[N-i])
0