結果
| 問題 | No.3210 Fixed Sign Sequense |
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2025-07-25 21:30:56 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 2,000 ms |
| + 887µs | |
| コード長 | 208 bytes |
| 記録 | |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 96,112 KB |
| 実行使用メモリ | 83,968 KB |
| 最終ジャッジ日時 | 2026-07-13 12:06:14 |
| 合計ジャッジ時間 | 4,876 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
N=int(input())
S=input()
m,p=0,S.count('+')
ans=max(S.count('+'),S.count('-'))
for s in S:
if s=='-':
m+=1
elif s=='+':
p-=1
ans=max(ans,m+p)
if s=='0':
ans=max(ans,m+p+1)
print(ans)
timi