有序序列合并-C语言

有序序列合并__牛客网 (nowcoder.com)icon-default.png?t=M666https://www.nowcoder.com/questionTerminal/0852e1fe2f65419e8bc50839ca9cfbc1有序序列合并-C语言_第1张图片

 

#include
int main()
{
	int n,m;
	scanf("%d%d", &n, &m);
	int a[2000];
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i]);
	}
	for (int i = n; i < n + m ; i++)
	{
		scanf("%d", &a[i]);
	}
	//a[n+m]初始化(乱序)
	//a[n+m]排序
	for (int j = 0; j < n + m; j++)
	{
		int min = a[j];
		for (int i = j+1; i < n + m; i++)
		{
			if (a[i] 

 

你可能感兴趣的:(leetcode刷题,初学c语言,大数据,c语言)