WEBSITE RETURNED, HOWEVER SUBMIT QUANTITY IS RESTRICTED PER DAY TO VERY LITTLE (UNDER JUDGE0 NEW POLICY, API PROVIDER). Therefore it is very much for you to pay attention TEST CAREFULLY CODE BEFORE SUBMIT.

Insert a sequence of numbers

Threads: Write a program to input an integer array of n elements (1<n<10000). Enter an integer x and position k (0<k<=n+1), Insert number x into position k in the above array.
Input: Including 4 current: current 1 Integer n, current 2 n integers separated by spaces, current 3 số nguyên x và dòng 4 số nguyên k.
Output: 1 dòng là dãy số nguyên sau khi chèn

For example:
Input:
6
3 4 5 6 7 8
9
4
Output
3 4 5 9 6 7 8

You are not logged in? Log in to Submit Now!

Add a Comment