Alice and Bob are playing a game of cards.
You have a total of $$$n$$$ cards to be distributed among each other. You are also given a parameter $$$k$$$
Alice and Bob are given the cards in a particular order, and they have to play the game in that particular order only.
Example : if Bob gets = $$$[3, 2, 1]$$$, it means he needs to play $$$3$$$ first, then $$$2$$$, then $$$1$$$.
If the sum of values of Alice And Bobs Cards on a particular round exceed $$$k$$$, that means you have distributed the cards unfairly.
You can shuffle the cards in any order you want, you have to make sure that least number of pairs on a current round have sum exceeding $$$k$$$
It is guaranteed that $$$n$$$ is even
If there are multiple ways of shuffling cards with same minimum pairs, it is accepted
The first line of input contains 2 integers, $$$n$$$ and $$$k$$$ $$$(1 \leq n \leq 10^5)$$$ $$$(1 \leq k \leq 10^9)$$$
The second line of input contains $$$n$$$ integers, the card values $$$(1 \leq a[i] \leq 10^9)$$$
On the First line you need to print the minimum number of rounds such that the sum of Alice and Bobs Card Values are exceeding $$$k$$$
On the Second line you need to print $$$n / 2$$$ values, Representing Alice's Cards
On the Third line you need to print $$$n / 2$$$ values, Representing Bob's Cards
6 6 1 2 3 4 5 6
1 6 5 4 3 1 2
In the Sample Testcase, only the first pair $$$(6 + 3)$$$ is exceeding $$$6$$$, rest $$$2$$$ pairs are $$$ \lt = k$$$.
You are playing a game where you have $$$n$$$ portals.
You want to find that for a given $$$n$$$, what is the maximum points you can recieve if you jump optimally.
Since this score might be very large, find the answer modulo $$$998244353$$$
Each test consists of a single integer as output, the maximum points
10 1 2 3 4 5 6 7 8 9 10
0 2 3 10 10 21 21 42 42 55
You are interviewing for the role of Strategist in a F1 Team. To impress the team principal, you need to write a program giving the most optimal strategy to win an F1 Race.
The main motive of a race is to complete the race in as minimal time as possible. You need to build a tire strategy to help that.
F1 has 3 types of tires, Lets call them Soft, Medium and Hard, each tire has different age and speed.
You are given fresh speed of all 3 tires, namely $$$c1$$$, $$$c2$$$, $$$c3$$$
Lets say your tires are $$$x$$$ laps old
The only line of input has 7 integers, $$$laps$$$, $$$c1$$$, $$$c2$$$, $$$c3$$$, $$$stop$$$, $$$minstop$$$, $$$maxstop$$$
If you have multiple strategies with same minimum time, they are accepted
5 1 2 3 1 0 2
13 1 2 2 1 4 1
5 1 2 3 1 0 1
18 1 1 3 1
80 1 12 20 20 0 3
2320 1 3 15 1 30 3 55 3
Lets take the First Example