Help with problem "Old Christmas Lights"
Hello everyone, could you provide some ideas for this problem? I think it might use sparse table.
Thanks!