#P5650. 基础字符串练习题
基础字符串练习题
Description
Given a non-empty binary string with non-zero length.
Find a non-empty contiguous substring of such that the number of in the substring minus the number of in the substring is maximized.
You only need to output this maximum value.
Input Format
One line containing a binary string representing .
Output Format
One line containing one number representing the answer.
0111100101
2
Hint
Let .
Constraints
| Test Point ID | |
|---|---|
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号