yes
Time Limit: 1 seconds
Memory Limit: 256 MB
Rating: 800
Problem StatementTwo separate reports document the sequence of events. Merge them into one sorted log to piece together the timeline. Our admins will make sure you've done this correctly or else you'll pay some big consequences!
InputYou are given two space-separated integers $N$ and $M$, followed by a line of $N$ integers $A_i$ and a line of $M$ integers $B_i$. Arrays $A$ and $B$ are space-separated as well. $1 \le N \le 50{,}000$ $1 \le M \le 50{,}000$ $-10^9 \le A_i, B_i \le 10^9$
OutputOutput $A$ and $B$ merged together in a single line, in ascending order.
Sample CasesSample Input 1: 2 2 1 2 3 4 Sample Output 1: 1 2 3 4Explanation
Merge the two lists into $[1, 2, 3, 4]$.
SourcesKL Coding Cup March 2025 > Speed Round > Problem 4
Submit | Back