kith14's blog

By kith14, history, 3 years ago, In English

Dear Codeforces community,

We are excited to invite you to TLX Regular Open Contest #33!

Key details:

Many thanks to:

Please register to the contest and we hope you will enjoy TROC #33!

Please help us improve TLX by filling out this survey.

UPD: Added scoring distribution.

UPD2: Contest is over!

Congratulations to the top 5:

  1. hitonanode

  2. errorgorn

  3. SSRS_

  4. noimi

  5. rniya (same as the 4th rank)

Congratulations to our first solvers:

You can upsolve the problem here. Editorial is available in the upsolve link!

Thank you for participating and see you on the next contest!

  • Vote: I like it
  • +64
  • Vote: I do not like it

»
3 years ago, hide # |
 
Vote: I like it +42 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +39 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +46 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +45 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +47 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +37 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +28 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +27 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +28 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +23 Vote: I do not like it

Uwogh a TROC!

»
3 years ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

Uwogh a TROC <3

»
3 years ago, hide # |
 
Vote: I like it +39 Vote: I do not like it

Friendly Bump! Contest starting in 1 hour!

Don't forget to read all the problems! Good Luck Have Fun :D

»
3 years ago, hide # |
 
Vote: I like it +21 Vote: I do not like it

Friendly reminder, the contest will start in about 20 minutes! Really hope you all enjoy the problems <3

»
3 years ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

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

»
3 years ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

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

»
3 years ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

I'd love to share an alternative solution to problem H. It's $$$O(n\log n)$$$ but I don't recommend anyone to try. I will tell you the reason later.

Consider the no-modify version, we can use naive centroid decomposition. The same as editorial' solution we get it offline to avoid any change of tree structure.

To achieve modification, we need to reuse the structure of divide and conquer. Each time we find the position to modify, we keep jumping upwards to the upper D&C layer and focus on its centroid. The information during the first naive centroid decomposition will be remained and maintained.

For each centroid, we maintain $$$cnt[x][d]$$$ meaning the number of vertex $$$y$$$ that satisfies $$$dis(x,y)=d$$$ in current D&C area. It's clear that only $$$O(n\log n)$$$ $$$cnt[][]$$$ will be used.

Additionally, don't forget to remove the contributions of non-simple path during the modification. That means you need another $$$cnt$$$.

If you choose hash table to precalculate distance between two vertexes, the total complexity will be $$$O(n\log n)$$$.

However, the constant factor is so EXTREMELY LARGE that it didn't even fit in the 4.0s TL. That's why I don't recommend it.

see: