Rowena Ravenclaw's Diadem

Problem Name:
Rowena Ravenclaw's Diadem
Site:CodeForces
Links:
Tags:
Problem setters: