#27. 合并数组

    ID: 27 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatArray-1gesp1顺序结构

合并数组

Merge Arrays

Background

Congcong is organizing data and needs to merge two short data sets into one longer set.

Problem Description

Given two integer arrays, each of length 22, return a new array of length 44 containing all their elements.

Input Format

Input is given from Standard Input in the following format.

a1 a2 b1 b2

Output Format

Output is to be printed to Standard Output in the following format.

[c1, c2, c3, c4]

Sample

1 2 3 4
[1, 2, 3, 4]
4 4 2 2
[4, 4, 2, 2]
9 2 3 4
[9, 2, 3, 4]

Sample Explanation

Merge the elements of the first array [1, 2] and the second array [3, 4] in order to get the new array [1, 2, 3, 4].

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.