We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
数据范围有限,可以直接暴力模拟。如果数据范围扩大,可以预先计算前缀和。
https://cp-wiki.vercel.app/tutorial/leetcode/BC39/
The text was updated successfully, but these errors were encountered:
题主能讲下 Problem B的详细解法吗
Sorry, something went wrong.
@TheBestCVMan 最终形成的字符串一定是前半段为a,后半段为b,所以我们就枚举它是从哪一位开始变成b的。需要的修改次数等于前半段的b的个数加上后半段的a的个数。
a
b
No branches or pull requests
Leetcode 第39场双周赛题解 | CP Wiki
数据范围有限,可以直接暴力模拟。如果数据范围扩大,可以预先计算前缀和。
https://cp-wiki.vercel.app/tutorial/leetcode/BC39/
The text was updated successfully, but these errors were encountered: