結果
| 問題 |
No.1133 キムワイプイーター
|
| ユーザー |
|
| 提出日時 | 2020-12-02 16:44:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 738 ms / 2,000 ms |
| コード長 | 351 bytes |
| コンパイル時間 | 135 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 26,932 KB |
| 最終ジャッジ日時 | 2024-09-13 10:31:51 |
| 合計ジャッジ時間 | 8,864 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 31 |
ソースコード
n, m = map(int, input().split())
S = input()
L = [[1]*(n+1) for _ in range(n+1)]
x = 0
y = 0
Lx = [0]
Ly = [0]
for s in S:
if s == 'R':
x += 1
elif s == 'L':
x -= 1
elif s == 'U':
y += 1
else:
y -= 1
Lx += [x]
Ly += [y]
for i, j in zip(Lx, Ly):
L[j][i] = 0
for i in L[::-1]:
print(*i)