#include<stdio.h> typedef struct{ int element[50]; int length; }SeqList; CreateSeqList(SeqList*S) { scanf("%d",&S->length); for(int i=0;i<S->length;i++) scanf("%d",&S->element[i]); } InsSeqList(int e,SeqList*S) { int i,j; for(i=S->length;S->element[i-1]>e&&i>0;i--) S->element[i]=S->element[i-1]; S->element[i]=e; S->length++; } OrderSeqList(SeqList S) { for(int i=0;i<S.length;i++) printf("%d ",S.element[i]); } int main() { SeqList S; int e; CreateSeqList(&S); scanf("%d",&e); InsSeqList(e,&S); OrderSeqList(S); return 0; }