Bowling Strategy :) (Codechef Contest Problem)
Question:- In a cricket game, an over is a set of six valid deliveries of balls performed by one player ― the bowler for this over. Consider a cricket game with a series of N overs (numbered 1 through N ) played by K players (numbered 1 through K ). Each player may be the bowler for at most L overs in total, but the same player may not be the bowler for any two consecutive overs. Assign exactly one bowler to each over in such a way that these rules are satisfied or determine that no such assignment exists. Input The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows. The first and only line of each test case contains three space-separated integers N , K and L Output For each test case: If there is no valid assignment of bowlers to overs, print a single line containing the integer − 1 . O...