powerHouseOfTheCell's blog

By powerHouseOfTheCell, history, 7 weeks ago, In English,

Hello All,

I was recently trying to solve this problem: https://codeforces.com/problemset/problem/1210/C. After realizing it was finding the sum of gcd on paths, I thought that this problem was a direct application of Centroid Decomposition.

However, my submission (https://codeforces.com/contest/1210/submission/61229151) got WA on test case 6. I do not think my code is the problem as I have verified it with this problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=286

I am wondering if my logic of choosing to use centroid decomposition is wrong. Any help would be greatly appreciated!

Read more »

 
 
 
 
  • Vote: I like it
  • -7
  • Vote: I do not like it

By powerHouseOfTheCell, history, 2 months ago, In English,

Hello all,

Are there any good (yet basic) problems that use a segment tree of dsus? I've been reading a lot of problem tutorials that use this as the solution, but I don't really understand how it works. I was hoping to start out with simpler problems and gradually work to the harder problems.

However, when I tried searching the topic up on google, the closest thing I could find was an article that briefly mentioned combining segment trees and dsus but failed to explain it for a beginner.

The example problem is here: https://codeforces.com/contest/763/problem/E

Any recommendations would be greatly appreciated!

Read more »

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

By powerHouseOfTheCell, history, 3 months ago, In English,

Hi all, I have a quick question for the codeforces community.

I was wondering how you all got faster at solving problems in contests. See, I recently took the Div2 contest today and solved A to D with around 25 minutes to spare for problem E ( https://codeforces.com/problemset/problem/1200/E ). After reading the statement, I knew almost immediately it was a hashing problem and yet I was still unable to solve the problem in time despite the fact that many contestants solved it in a shorter amount of time.

I know that the simple answer to this question is that I should solve more problems. But I feel that there is something more, because I am able to identify the solution but not implement it in time. Any advice for training would be greatly appreciated.

Read more »

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