Battlefield

X and Y represent the first and last cell in the row/column. Clues outside the grid give either the sum of the digits where the first X and last Y cells in the row/column overlap, or the sum of the digits between the first X and last Y cells in the row/column