There are three containers A, B and C with capacity 5, 3 and 2 litres respectively. They are connected to each other by drains and filling pipes. There are valves in the piping circuit which are controlled by a computer program, with the following set of instructions
FILL (X,Y) | Fills container X from container Y (if all the liquid in Y can completely fit into X) |
EMPTY(X,Y) | Empties container X into container Y (if all the liquid in X can completely fit into Y) |
DRAIN(X) | Completely drains container X |
Initial condition is that container A is full and B and C are empty.
The relationship between two variables \( x \) and \( y \) is given by \( x + py + q = 0 \) and is shown in the figure. Find the values of \( p \) and \( q \). Note: The figure shown is representative.
When $10^{100}$ is divided by 7, the remainder is ?