1449: 函数进行集合运算(加法)
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:5
Solved:3
Description
我们规定一种数组的加法:数组A+数组B=数组A有的元素但数组B没有的元素+数组B有的元素但数组A没有的元素+两者都有的元素保留一个(不重复)。请用函数来实现两个数组的加法。
Input
两个长度为五的数组
Output
求和之后的数组,每个元素用空格隔开。
Sample Input Copy
1 2 3 4 5
4 5 6 7 8
Sample Output Copy
1 2 3 4 5 6 7 8