report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Merge array - MarisaOJ: Marisa Online Judge

Merge array

Time limit: 1000 ms
Memory limit: 256 MB
Given $2$ non-decreasing integer array $A, B$, both of length $n$. Merge them into an non-decreasing array and print it. ### Input - The first line contains an integer $n$. - The second line contains $n$ integers $A_i$. - The third line contains $n$ integers $B_i$. ### Output - Print the merged array. ### Constraints - $1 \le n \le 10^5$. - $1 \le A_i, B_i \le 10^9$ ### Example Input: ``` 3 1 3 4 1 2 3 ``` Output: ``` 1 1 2 3 3 4 ```
Introduction to two pointers
Merge array
Brewing potion 2
Unique elements
Small range
Number of pairs
Sum of three values
Brewing potion 3
Brewing potion 4
Three sequences
Biggest submatrix
Choosing numbers
Topic
Two pointers
Rating 800
Solution (0) Solution