栈模拟,我用的是比较笨的方法,直接贴代码
#include<iostream>
#include<cstdio>
#include<stack>
#include<cstring>
using namespace std;
const int maxn = 1e3+10;
bool vis[maxn];
int main(){
//freopen("in.txt", "r", stdin);
int m, n, k, num, top;
cin >> m >> n >> k;