10.07.2021

Vladislav Remidovskiy
2 min readJul 10, 2021

It was a harsh day for me as I was very tired. So I don’t want to write a huge story today with descriptions of all tasks and their solutions. Just some notes.

I wrote Umnik’s Day 5 contest and Div. 3 on Codeforces. 5 + 5 problems AC. Div. 3 was not efficient as I was tired and my family members distracted me a lot.

I realized that my huge problem is stubbornness. For example in this task everything you should do is just be careful in implementation and take into account all changes after some deletions. And I wrote code that I thought was very clear and I took into account everything. But after an hour of stupid looking at the code, I realized that I could just be more patient, work with a paper and find a weak part. But I spent an hour.

Conclusion: DON’T BE STUBBORN. TRY TO REINVENT THE SOLUTION. DON’T BE SURE THAT YOUR CODE IS GOOD. IT’S WRONG IF YOU GOT WA.

Cool solution got from analysis of this task from Umnik’s Day 4. Brief description: Given a undirected graph with n nodes and the parity of the number of times that each place is visited. Construct a consistent path. The solution is simple dfs with the invariant that all vertices in dfs-subtree of current vertex u should be cleared. That’s all!

Interesting task from today Umnik’s contest. Again my stubbornness. I saw that there are some restrictions on correct bracket sequence and you should construct the answer. Urghh. But. n ≤ 600, ok? What does it mean? You can do some quadratic DP! And as it is CBS, may be it should be DP on subsegments? Yes! That’s a pity that I realized it only in the second part of the 5-hour contest. Don’t want to determine DP, just look at code, it’s simple:

Conclusion: DON’T BE AFRAID OF TASKS. JUST GIVE YOURSELF TIME TO LOOK AT RESTRICTIONS WITH PATIENCE AND MAY BE IT WILL BECOME SIMPLIER

--

--