Help in a cses judge problem
Can someone please tell how to solve This problem
Colin X Sam X Shayan | Easy Problems Duel | NAC Warmup #1
Codeforces Round 946 Solution Discussion