結果
問題 |
No.1133 キムワイプイーター
|
ユーザー |
|
提出日時 | 2020-07-27 22:18:53 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 89 ms / 2,000 ms |
コード長 | 306 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 77,696 KB |
最終ジャッジ日時 | 2024-06-28 20:17:55 |
合計ジャッジ時間 | 3,262 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 31 |
ソースコード
n, m = map(int, input().split()) s = input() ans = [[1]*(n+1) for _ in range(n+1)] ans[n][0] = 0 x, y = 0, 0 for si in s: if si=='U': y += 1 elif si=='D': y -= 1 elif si=='R': x += 1 else: x -= 1 ans[n-y][x] = 0 for ans_i in ans: print(*ans_i)