文章
17
粉丝
177
获赞
2
访问
118.7k
#include<iostream>
#include<stack>
#include<string>
#include<map>
using namespace std;
int main(){
int n;
map<char,int> m;
m['{'] = 4;
m['['] = 3;
m['('] = 2;
m['<'] = 1;
string s;
cin >> n;
while(n--){
stack<char> st;
stack<int> pri;
cin >> s;
int i = 0;
pri.push(m[s[i]]);
st.push(s[i]);
i++;
while(i < s.length()){
if(s[i] == '{' || s[i] == '[...
登录后发布评论
暂无评论,来抢沙发