#define MaxSize 100
class SeqList{
private:
int a[MaxSize];
int length;
public:
SeqList(){
length=0;
}
int insert(int i,int x);
int del(int i);
int reverse();
void show();
};
int SeqList::insert(int i,int x){
for(int j=length;j>i;j--)
a[j]=a[j-1];
a[i]=x;
length++;
return 1;
}
int SeqList::del(int i){
for(int j=i;j<length-1;j++)
a[j]=a[j+1];
length--;
}
int SeqList::reverse(){
int b[length];
for(int i=0;i<length;i++)
b[i]=a[i];
for(int i=0;i<length;i++)
a[i]=b[length-i-1];
return 1;
}
void SeqList::show(){
for(int i=0;i<length;i++)
std::cout<<a[i]<<" ";
}