#P6336. [COCI 2007/2008 #2] BIJELE
[COCI 2007/2008 #2] BIJELE
Background
Mirko found an incomplete set of chess pieces in the attic.
Problem Description
A correct set of chess pieces should contain:
- one king;
- one queen;
- two rooks;
- two bishops;
- two knights;
- eight pawns.
Now you are given how many pieces of each type are in this incomplete set. Please determine how many pieces need to be added or removed to make a complete set.
Input Format
Input one line with six numbers, in order: the counts of kings, queens, rooks, bishops, knights, and pawns. These numbers are all in (inclusive).
Output Format
Output one line with six numbers, in order: how many kings, queens, rooks, bishops, knights, and pawns need to be added or removed. Use positive numbers to indicate adding, and negative numbers to indicate removing.
0 1 2 2 2 7
1 0 0 0 0 1
2 1 2 1 2 1
-1 0 0 1 0 7
Hint
Explanation
This problem is translated from COCI2007-2008 CONTEST #2 T1 BIJELE。
Translated by ChatGPT 5