如题
#include<iostream>
using namespace std;
struct stack{
int top=0,ans[114514];
stack(){}
bool Empty(){if(top==0)return 1;else return 0;}
void Push(int x){ans[top++]=x;}
int Top(){return ans[top-1];}
int Pop(){if(Empty())return -1;else return ans[--top];}
int Size(){if(top==0)return 0;else return top;}
void Clear(){top=0;}
};
int main(){
stack s;
Push(s,114514);
printf("%d",Top(s));
Clear(s);
printf("%d",Empty(s));
return 0;
}