 # Provide solutions

#1

Hello everyone, can anyone provide solutions/logics to the questions, I had solved only one question and I want to upsolve the remaining problems.

#2

@bhargav-thota I can provide you with logic for three questions that I solved
1- create an additional node say (n+1) and add a edge from n+1 to all other nodes with length of edge as the concert ticket price in that particular node. With n+1 as source use djikstra to find shortest path to all nodes

2- From source find all nodes with distance less than B .
Answer will be 2^cnt, where cnt is number of nodes calculated above. Nodes which are at a distance greater than or equal to B will depend on nodes above.
For each nodes with distance less than B we have 2 option to color.

4- we can have a continuously increasing array till index B and after that we can have the largest value at index B so that all index after B will be bad. To get the lexicographically minimum answer ans[i] should be equal to i+1 for all i>=B.

#3

Thanks @uddeshya-yadav-4-yr 