Editorial for COCI '16 Contest 7 #1 Baza


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

In order to successfully solve this task, we first need to input and store the entire database, the matrix of dimensions N \times M.

Then, for each query, we need to iterate over each row of the matrix and count how many rows of the database correspond to the query in the way described in the task.


Comments

There are no comments at the moment.