Back to Browse

CSES Problem Set: Tree Distances I - Video Tutorial

1.7K views
Jan 3, 2024
12:00

Today I'm going to present an interesting tree task from the CSES Problem Set which is using a technique that's often overlooked, which is what I call the two dfs technique or as it's also called, rerooting DP (although this is an easier example of this technique). Problem: https://cses.fi/problemset/task/1133 Solution Code: https://cses.fi/paste/b05278e7c649ddb07b8553/ Another rerooting tutorial: https://usaco.guide/gold/all-roots?lang=cpp My website: https://stefdasca.ro/ Codeforces profile: https://codeforces.com/profile/stefdasca Discord server: https://discord.gg/ZDfmQBKHkC Facebook page: https://www.facebook.com/stefan.dascalescu.2013/ Linkedin: https://www.linkedin.com/in/stefdasca/ Instagram page: https://www.instagram.com/stefdasca/

Download

1 formats

Video Formats

360pmp415.9 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

CSES Problem Set: Tree Distances I - Video Tutorial | NatokHD