Here you can watch how I solved A–F from [contest:1919]: https://youtu.be/3TV2VpVbUjM. Unfortunately, I only solved [problem:1919E] after the contest has ended because my C++ template was too poor. This is an important lesson for me to collect all important algorithms and finally sit down and include them in the template.↵
↵
**UPD:** the video is high resolution now.
↵
**UPD:** the video is high resolution now.