http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 n grid. In this game a ships are placed on the grid. Each of the ships consists of bconsecutive cells. No cell can be part of two ships, however, the ships ca…