Viewing insights from Codeforces 1146C: Tree Diameter that are similar (thus shared) with only this insight from Codeforces 1550B: Maximum Cost Deletion: I had learnt a new approach the minm no. of subarrays of 0 in a binary array in loop if(s i-1!=si) sum++; no of subarrays=sum/2 + 1; by darth_raider
- When doing a bitmask problem, consider comparing each bit one at a time. When comparing with two numbers, consider the place where the bits first differ by tester
Page 1 of 1.
View links to all pages
1About • Privacy Notice • Rules • Problems list • Journal • Your profile • GitHub
Moon Symbol icon by Icons8 • Sun icon by Icons8 • Emojis from Twemoji by Twitter under CC by 4.0