Contest Experience: Codeforces Round 891 (Div. 3)
Last Updated :
08 Aug, 2023
About The Contest:
This Contest was organized on 7 August 2023 on Codeforces. The Contest consisted of 7 problems and had a duration of 2 hours and 15 minutes. The contest had around 40k registrations which was the most for any Div 3 contest till now on Codeforces.
Contest Link: Codeforces Round 891 (Div. 3)
My Experience:
I was able to solve 6 out of 7 problems during the contest.
Greedy, Maths
|
Easy
|
5 mins
|
1
|
Greedy, Implementation, Maths
|
Medium
|
30 mins
|
1
|
Greedy, Sorting
|
Easy
|
15 mins
|
1
|
Sorting, Maths
|
Easy-Medium
|
10 mins
|
2
|
Sorting, Maths
|
Medium
|
45 mins
|
1
|
Hashing, Maths
|
Medium
|
25 mins
|
1
|
Problem A: Array Coloring
This was the easiest question of the contest. We just had to check whether the total sum of the array is even or odd. If the total sum comes out to be even then it is always to color the elements of the array using two colors such that their parity is the same and the answer will be Yes otherwise No.
Problem B: Maximum Rounding
Surprisingly, I found this question really complicated. The problem statement was really confusing and it took me a lot of time to really figure out what actually had to be done. Once I finally understood, I just iterated from behind, and if a character greater than 5 was found the previous character was incremented by 1. If the previous character was 9 in that case we have to search for the character less than 9. The implementation was also not really straightforward and the problem was above the level of a normal Div-3 B problem and took me more than 30 minutes to solve it.
Problem C: Assembly via Minimums
This Problem was much simpler than Problem B. I just stored all the elements along their frequencies in an array of pairs and sorted that array in ascending order according to values. Then I just iterated the array and from the frequency of each element, it was determined how many times that element will be present in the final answer. It took me around 5 minutes to implement the above idea.
Problem D: Strong Vertices
This was again a really straightforward problem for me as I had solved this type of problem in the past. By looking into the problem I just transformed the equation Au-Av>=Bu-Bv to Au-Bu>=Av-Bv. Now I stored Ai-Bi for each i from 1 to N and sorted the array in decreasing order along with indexes and the final answer was the elements that were equal to the largest element.
I made one wrong submission because I did not print the vertices in increasing order as was mentioned in the problem. But still, it took me less time to solve this problem comparedhad to Problem B and Problem C.
Problem E: Power of Points
This was the most interesting problem for me in the contest. After reading the problem statement for the first time,II got the idea that the problem would be solved by maintaining a prefix and suffix array. But still, it took me around 30 minutes to think of the correct approach and how to implement it. The implementation part didn’t take much time as it was required to sort the coordinates and maintain the prefix and suffix sum. It took me around 40 minutes to solve this problem.
Problem F: Sum and Product
By the time I reached Problem F, only 20 minutes were remaining in the contest and it was really challenging for me to solve the problem in that space of time. The problem was a standard mathematical problem as in each query a+b=x and a*b=y were given. I solved this using a quadratic equation and to find the total possible solutions, I used an unordered map in C++ to store the frequency of each element in the array.
Conclusion
Due to 7 problems, it took me more than 2 hours to finish it. I got accepted just 5 minutes before the end of the contest.
Share your thoughts in the comments
Please Login to comment...