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

### priojeet_priyom's blog

By priojeet_priyom, history, 14 months ago, ,

my approach to this problem is:
1. build mst using prims
2. run a bfs from any special node to find the maximum edge between special nodes and that edge is the answer for all nodes.
my submission

• 0

By priojeet_priyom, history, 18 months ago, ,

Tried solving 149 E Martian Strings using z-algo. my approach is: compute z value for pattern$text and reverse(pattern)$reverse(text). then find the minimum index for each prefix length match and find the maximum index suffix length match for all length i (0<=i<length(pattern). the complexity of my code is approx O(m*n) which is 10^7. getting TLE. tried optimizing but no luck till now, also tried reading others code but could make sense out of those. my code: submission link

• +5

By priojeet_priyom, history, 3 years ago, ,

I had some problems that I wanted to solve later. So tried adding in my favorite list.Though the star indicator became yellow in problem page, it wasn't added in my favorite problem list. Please take a look on this issue, MikeMirzayanov.