#P6336. Complete Chess Set

    ID: 19552 Type: Default 1000ms 256MiB

Complete Chess Set

Complete Chess Set

A complete chess set should consist of the following pieces:

  • 1 King
  • 1 Queen
  • 2 Rooks
  • 2 Bishops
  • 2 Knights
  • 8 Pawns

Given the current counts of each type of piece, you need to calculate the number of pieces to add (if the result is positive) or remove (if negative) in order to complete the set. For each piece, compute the value as \( expected - current \).

inputFormat

The input consists of a single line containing six space-separated integers representing the current number of pieces in the following order: King, Queen, Rook, Bishop, Knight, Pawn.

outputFormat

Output a single line with six integers separated by spaces. Each integer represents the difference needed for King, Queen, Rook, Bishop, Knight, and Pawn respectively. A positive number means pieces must be added and a negative number means pieces must be removed.

sample

0 1 2 2 2 7
1 0 0 0 0 1