Lazy Larry loves trees with a passion and wants to create the perfect natural park. However, his evil nemesis, Hardworking Harry, hatches a plan to ruin Larry's plan.
One aspect of Larry's plan is the perfect tree line. Larry has $$$N$$$ trees, with heights ranging from $$$1$$$ to $$$N$$$. Each tree has a distinct height, so for example, if $$$N$$$ is $$$5$$$, Larry has $$$5$$$ trees with heights $$$1$$$, $$$2$$$, $$$3$$$, $$$4$$$, and $$$5$$$. Larry wants the tree heights to be in a specific order represented by array $$$a$$$ of length $$$N$$$.
Now, it is Harry's job to visit the park's site and place the trees in a way which angers Larry as much as possible. Larry's anger can be quantified as the minimum distance between his desired tree height for that location and the height of the tree placed at that location. In other words, if Harry places the trees in a manner given by an array $$$b$$$, Larry's anger will be $$$min(|a_i - b_i|)$$$ over all $$$i$$$. Find a way in which Harry can place trees such that Larry will be maximally angry, and print both his anger level and the tree placement.
Line $$$1$$$: One integer $$$N$$$ ($$$1 \le N \le 10^5$$$).
Line $$$2$$$: $$$N$$$ space separated integers: $$$a_1$$$, $$$a_2$$$,...,$$$a_N$$$ ($$$1 \le a_i \le N$$$), each representing the $$$i$$$th tree height which Larry wants. Note that all $$$a_i$$$ are distinct.
Line $$$1$$$: One integer representing the maximum distance possible to another order of tree heights.
Line $$$2$$$: $$$N$$$ space separated integers: $$$b_1$$$, $$$b_2$$$,..., $$$b_N$$$, each representing the $$$i$$$th tree height which Harry will set to maximize the distance between Larry's wishes and the actual heights of the trees.
3 3 2 1
1 1 3 2
$$$1 \le N \le 10^5$$$