Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

aditya_sheth's blog

By aditya_sheth, history, 7 months ago, In English,

Problem. I checked various solutions. I could see DSU and Dynamic programming in most of them. Any hint or full solution would be helpful.

Read more »

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it