Блог пользователя Shisuko

Автор Shisuko, 9 месяцев назад, По-английски

106262A - Alphabet Chocolate

Hint
Solution

106262B - DJ Nicholas

Hint
Solution

106262C - The Drift King

Hint 1
Hint 2
Solution

106262D - Drinking Culture

Hint 1
Hint 2
Solution
Floating point issues

106262E - Long Distance Examination

Hint
Solution

106262F - Map and Fold

Hint 1
Hint 2
Solution
A common error

106262G - Max Cut Min Flow

Hint
Solution

106262H - Prime Topology

Hint
Solution

106262I - Stone Steps

Hint 1
Hint 2
Solution

106262J - Tic-Tac-Toe on a Graph

Hint
Solution

106262K - Toxic Culinarity

Hint 1
Hint 2
Solution

106262L - Trace of Product of Sparse Square Matrices

Hint
Solution

106262M - Web Delivery

Hint 1
Hint 2
Solution
Разбор задач 2025 ICPC Asia Manila Regional
  • Проголосовать: нравится
  • +20
  • Проголосовать: не нравится

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Shisuko (previous revision, new revision, compare).

»
9 месяцев назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

Will u guys please add this in gym?

»
9 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Shisuko (previous revision, new revision, compare).

»
8 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

In problem i. I think some transitions in the DP logic are incorrect or I misunderstood it.

in Case $$$s_j \gt d$$$:The tutorial states:

$$$c_j = 10 c_{j-1} + 1$$$

any future digit d we append would be sorted to the left of s_j . Therefore, the new empty slot must also be shifted to the left by a power of 10. the Correct one

$$$c_j = 10(c_{j-1} + 1)$$$

In Case s_j = d:The tutorial states:

$$$dp_j = dp_{j-1} + d \cdot c_{j-1}$$$

If we use c_{j-1}, we will miss the contribution of the new subarray starting at index $j$. and also we need to shift previous dp by 10 since $$$s_j$$$ takes up a spot. the correct one :

$$$dp_j = 10 \cdot dp_{j-1} + d \cdot c_{j}$$$

here is my solution