This isn't the fastest possible solution but I think it's elegant. Don't expect more coding content out of me, I just wanted to make this video because I was proud of my discovery and no one else has made a video about this yet, but I won't be making more in the future.
My code:
[ Ссылка ]
Dmoj link:
[ Ссылка ]
0:00 Problem description
0:41 Short explanation of solution
2:04 Proof of v-shape insight
5:46 Programming implementation
Cipher Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
[ Ссылка ]
![](https://i.ytimg.com/vi/4ebeCt1CjPE/maxresdefault.jpg)