Pixel · Easy CodeFree
Breakfast on Fire
A dragon has opened a café. His kitchen is a grid of bread slices and his fire breath is spectacularly imprecise: every order scorches a whole row or a whole column. How many slices come out perfect?
Count the perfectly toasted slices.
The number must be exactly right.
N M, the rows and columns of bread slices.Q, the number of orders.Q lines: R i (breathe along row i) or C j (along column j). Lines are counted from 1.N, M ≤ 1 000Q ≤ 1 0003 3 2 R 2 C 2
4
Sign in to play. It is free.
Sign in