文章
71
粉丝
142
获赞
5
访问
52.9k
#include<iostream>
#include<stack>
#include<algorithm>
#include<string>
using namespace std;
int main() {
stack<char> st;
string str;
cin >> str;
int length = str.size();
for (int i = 0; i < length;i++) {
if (!st.empty()) {
if (str[i] == '<' || str[i] == '(' || str[i] == '{' || str[i] == '[')
st.push(str[i]);
else if (str[i]=='>') {
&nb...
登录后发布评论
题目要求的是小写吧