結果
| 問題 | No.8126 Brainfxxk easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-01 21:32:04 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 316 bytes |
| 記録 | |
| コンパイル時間 | 114 ms |
| コンパイル使用メモリ | 85,288 KB |
| 実行使用メモリ | 139,720 KB |
| 最終ジャッジ日時 | 2026-04-01 21:32:12 |
| 合計ジャッジ時間 | 1,077 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 1 |
ソースコード
from collections import defaultdict as dd
n=int(input())
S=input()
d=dd(int)
a=0
for s in S:
if s=='<':
a-=1
if a==-1:
print('error')
exit()
elif s=='>':
a+=1
elif s=='+':
d[a]+=1
else:
d[a]-=1
for i in range(n):
print(d[i],end=' ')