Problem 1583 · Medium

Count Unhappy Friends

Simulate each friend's preference ranking to count friends who would rather switch to someone who prefers them back.

Open the interactive visualisation