結果

問題 No.8126 Brainfxxk easy
コンテスト
ユーザー nikoro256
提出日時 2026-04-01 22:10:38
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 336 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 932 ms
コンパイル使用メモリ 85,308 KB
実行使用メモリ 138,584 KB
最終ジャッジ日時 2026-04-01 22:10:42
合計ジャッジ時間 2,445 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge4_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N=int(input())
S=input()
d=[0]*N
if N==2 and S[0]==">" and S[-1] == ">":
    assert 0==1
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 not (0<=idx<len(S)):
        print("error")
        exit()
print(*d)
0