Problem 3450 · Easy

Maximum Students on a Single Bench

teaching version (not the official statement): count distinct students per bench after removing repeated pairs, then return the largest count. Official rule not verified.

Open the interactive visualisation