CF1406D Three Sequences

Description

You are given a sequence of $ n $ integers $ a_1, a_2, \ldots, a_n $ . You have to construct two sequences of integers $ b $ and $ c $ with length $ n $ that satisfy: - for every $ i $ ( $ 1\leq i\leq n $ ) $ b_i+c_i=a_i $ - $ b $ is non-decreasing, which means that for every $ 1

Input Format

N/A

Output Format

N/A

Explanation/Hint

In the first test: - The initial sequence $ a = (2, -1, 7, 3) $ . Two sequences $ b=(-3,-3,5,5),c=(5,2,2,-2) $ is a possible choice. - After the first change $ a = (2, -4, 4, 0) $ . Two sequences $ b=(-3,-3,5,5),c=(5,-1,-1,-5) $ is a possible choice. - After the second change $ a = (2, -4, 6, 2) $ . Two sequences $ b=(-4,-4,6,6),c=(6,0,0,-4) $ is a possible choice.