Can someone help me in understanding the solution for this problem. I am not getting any idea about what the editorial says. Please help. Thank you.
We have been given a graph such that a path exists between any two given nodes.The edges have some weight assigned to them. We are given a starting node and a ending node and we required to find the minimum distance between two nodes.The distance is the sum of edge weights. We have a special power by which we can change the weights of atmost k edges, we can make their weight to be equal to zero. So given two nodes we are supposed to find the minimum distance between them using the special power atmost k times.
We have n blogs with each blog having a writer w[i] and number of likes l[i].We need to arrange the blogs in such a manner that the total sum of happiness is maximized. Happiness of a blog is defined as number of likes of that multiplied by number of different writers that have occurred upto the given blog. We need the value of maximum happiness.