啊这,线下耗时最久,考试必败题
#include<iostream>
using namespace std;
int main()
{
string str;
while (cin >> str) {
int total, ans = 0;
for (int i = 0; i < str.size(); ++i) {
total = 0;
for (int j = i; j < str.size(); ++j) {
if (str[j] == '1')
total++;
else
total--;
if (total == 0)
...
登录后发布评论
暂无评论,来抢沙发