链接:https://ac.nowcoder.com/acm/contest/910/A
来源:牛客网
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 32768K,其他语言65536K
64bit IO Format: %lld
题目描述
现在有两个长度相等且为15的有序链表(都为升序),现在需要你将两个链表合成一个,并且保证两个链表合并完后依旧是升序(链表值相等并不影响最后的输出结果)
输入描述:
每个测试数据输入共2行 第1行:为第1个升序链表 第2行:为第2个升序链表
输出描述:
合并完成后的链表
示例1
输入
复制
2 5 18 21 27 34 41 61 62 69 78 81 91 92 95 0 4 16 24 27 36 42 45 53 58 64 67 82 91 95
输出
复制
0 2 4 5 16 18 21 24 27 27 34 36 41 42 45 53 58 61 62 64 67 69 78 81 82 91 91 92 95 95
#include <iostream>
#include <cstdio>
#include <math.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <set>
#include <li