栈stack:

 1 struct sta
 2 {
 3     int sz[100001];
 4     int top()
 5     {
 6         return sz[top];
 7     }
 8     void push(int x){
 9          sz[++top]=x;
10     }
11     void pop(){
12         if(top>0)
13         top--;
14     }
15     void cl()
16     {
17         top=0;
18     }
19     int size(){
20         return top;
21     }
22 }stack;
stack

相关文章:

  • 2022-02-26
  • 2021-07-09
  • 2021-12-15
  • 2022-01-08
  • 2022-12-23
  • 2021-10-25
猜你喜欢
  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2021-07-28
  • 2021-11-14
相关资源
相似解决方案