摘要:
1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N = 30; 4 int n; 5 int cnt = 20; 6 vector<int> state1; //已出栈的火车序列 7 stack<int> state2; / 阅读全文
摘要:
1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N = 1000010; 4 int stkl[N], stkr[N]; //左边这个栈。右边这个栈 5 int tl, tr; //左边这个栈的栈顶。右边这个栈的栈顶 6 i 阅读全文
摘要:
1 class MinStack { 2 public: 3 /** initialize your data structure here. */ 4 stack<int> stk, stk_min; //定义 5 MinStack() { 6 7 } 8 9 void push(int x) { 阅读全文