Makarov's Ambition - Mindstormer April 20 Question Brief : Two numbers s (number of states) and d (number of districts) followed by a series of 'n' numbers (0 and 1) will be given to you such that s*d=n. All you have to do is check that is there any way to divide the series into n parts such that in majority of states, the guild is victorious. The guild wins if more than half of the districts are won by the guild. Also the division will be consecutive. For example: if s=3, d=2 and series is a1, a2, a3, a4, a5, a6. so division can be made in only these two ways : (a1, a2), (a3, a4), (a5, a6) (a2, a3), (a4, a5), (a6,a1) Prequisite : Basic Programming Approach : We have to take two arrays, one to store the series and other stores the sum of series till that index. There can be only that number of ways to divide the states as many districts a state can have. All you have to do is check for the majority, by checking the