結果
| 問題 | No.8126 Brainfxxk easy |
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2026-04-01 22:07:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 334 bytes |
| 記録 | |
| コンパイル時間 | 521 ms |
| コンパイル使用メモリ | 85,200 KB |
| 実行使用メモリ | 150,352 KB |
| 最終ジャッジ日時 | 2026-04-01 22:07:25 |
| 合計ジャッジ時間 | 1,818 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 9 |
ソースコード
N=int(input())
S=input()
assert S[0]=="-"
d=[0]*N
idx = 0
for i in range(len(S)):
if S[i] == "+":
d[idx]+=1
elif S[i] == "-":
d[idx]-=1
elif S[i] == "<":
idx-=1
else:
idx+=1
if i==len(S)-1:
continue
if not (0<=idx<len(S)):
print("error")
exit()
print(*d)
nikoro256