Teleporting Ants & Dynamic Programming #SoME2

Codeforces Global Round 15
Problem 1552F. Telepanting

For a challenge, can you come up with an O(N) solution?
Please leave any constructive criticism in the comments!

Submission to 3b1b’s Summer of Math Exposition 2

Written and Animated by: Henry Liu, Samuel Brashears
Produced and Narrated by: Henry Liu
Music Licensed by: APM Music |

This video was made possible by the open source library manim, created by 3blue1brown and maintained by Manim Community:

Video Source Code:

27 thoughts on “Teleporting Ants & Dynamic Programming #SoME2”
  1. I've always wanted such content on youtube, and finally here it is. Looking forward for next videos.

    But personally for me it was very hard to follow the solution, the key part about what we store as dp_i and how we calculate it, is explained too briefly. (although I am 1900 on codeforces).

Leave a Reply

Your email address will not be published.