Editorial for BSSPC '22 P3 - Searching for Seats


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.

Author: Riolku

This problem can be simulated efficiently. Simply consider all seats, and check the surrounding seats to count the number of friends. Also, do not count a seat where your friend is sitting.


Comments

There are no comments at the moment.