**Results :**

Congratulations Participants! You did a great job in the competition. Kudos to our top 5 programmers of SRM03:

1. Shridhar Ravi

2. Kaustubh Badrike

3. Arpita Rane

4. Venkatesh murugesh

5. Apurva Mhatre

**Editorial :**

1. Convincing Rahul

The simple approach is to try Four possibilities of inserting the operators and output the maximum value as answer there are four possibilities \"a*b*c\",\"(a*b)+c\",\"a+(b*c)\",\"a+b+c\".Brackets are necessary to follow BODMAS rule .

2. Predict Shambhavi

The naive approach of solving this problem by traversing the array and decrementing the values by one on each turn gives TLE ( Time Limit Exceeded ) as the computer can perform only 10^9 operations in one second. Looking at the given constraints, maximum value of n being 10^5 and maximum value of W(i) being 10^9, this solution needs 10^14 operations which is infeasible.

A faster and smarter approach can be to decrease all the values W(i) and bring the minimum waiting time closer to n, as we know in every traversal all these values get decremented by n. Thus, this solution can solve the problem in less than 10^6 operations, passing the Time Limit.

3. Help Shweta to win The Matrix

The simple observation one can miss while solving this problem is the example :

“zaabcdbc”

After deleting “abcd” the string becomes “zabc” ( since the leftmost alpha-ordered string is to be deleted first )

After deleting “abc” the answer turns out to be “z”

Once you have deduced all the possible cases of this problem. It is easy to manipulate the string by replacing deleted characters with special symbols and ignoring the same in future traversals. Refer the coded solution for detailed manipulation.

**Coded Solutions:** Click here

(Make sure you use your Siesgst email address)

Thank you all for participating! Stay tuned for more contests.

## There are no comments!

Create an account or login to write a comment