CodeAgon 2023 Discussion

Правка en2, от srishtik_16, 2023-01-08 12:55:06

CodeAgon 2023 by Trilogy Innovations was held today. We can use this blog to discuss the problems and their approaches. I personally solved 2.5 problems, 1st , 4th and 5th partial (300 points). Would be interested in knowing the solutions for the others.

My Approaches:

Problem 1: Sort the array and find median. Try changing 1st two elements, last 2 elements, and 1st and last elements to the median, and try to find the optimal answer out of these 3 cases.

Problem 4: Solved it with DP,where DP[i] = expected steps for number i, Transistion -> dp[i] = (sum of (dp[div] + 1) for all divisors of i except 1) / count of divisors of i. The required answer is sum of dp[i] for all 1 to n, divided by n.

Problem 5: Did it partially with approach similar to this Problem.

Would love to hear your approaches too.

Thanks.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский srishtik_16 2023-01-08 12:55:06 624
en1 Английский srishtik_16 2023-01-08 12:36:32 289 Initial revision (published)