#include<iostream> #include<cstring> using namespace std; const int MAXN=100100; class mystack{ private: int a[MAXN]; int t=0;//the loction of top stack public: void push(int x); int pop(); int top(); bool empty(); }; void mystack::push(int x){ a[++t]=x; } int mystack::pop(){ int c=a[t];...