题目
description:
已知顺序表 L 递增有序,编写程序,将 X 插入到线性表的适当位置上,以保持线性表的有序性。
input:
第一行输入顺序表元素个数 elenum;(0<elenum<1000)
第二行输入顺序表 L;
第三行输入插入值 X。
output:
输出插入 X 后的有序顺序表
sample_input:
7
2 3 4 5 6 7 8
1
sample_output:
1 2 3 4 5 6 7 8
思路
略
代码
#include <stdio.h>
#include <iostream>
using namespace std;