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

Автор atcoder_official, история, 2 года назад, По-английски

We will hold Tokio Marine & Nichido Fire Insurance Programming Contest 2024(AtCoder Beginner Contest 355).

We are looking forward to your participation!

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

»
2 года назад, скрыть # |
 
Проголосовать: нравится +23 Проголосовать: не нравится

There is a strange bug on the homepage of ABC355. If you're in English mode, when you enter the page, your browser begins playing music; after that, there will be some Japanese introduction to this company.

I found that the problem was caused by the video on the homepage (in Japanese mode), and the solution is to ban your browser from automatically playing media on the page. And I hope AtCoder can fix it. This is not a big problem, but sometimes it's annoying.

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

Misread B :)

Btw, how to solve F? Does it involve link-cut trees?

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

found very difficult.

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

My idea for problem-E using dp find the minimum no of moves to reach from L to R, then get the path. I'm getting WA.

Code

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

SpeedCoder?

»
2 года назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Anybody missed reading the constraint on weight in F and then waste time?

»
2 года назад, скрыть # |
 
Проголосовать: нравится +116 Проголосовать: не нравится

Cool.

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

Is there any other solution apart from link-cut tree? I didn't know about link-cut tree so did a brute force kind of solution.
I processed initial N-1 edges from lowest weight to highest weight. For each weight, I maintained connected component data using DSU.
Then for each additional edge of weight W to add, I checked if nodes U, V are in same component at DSU of weight W. If they are that means, an edge with weight <= W has connected components of these two nodes so the incoming edge can't replace any edge in MST.

If they are in different components, then that means, components to which U, V belong are connected by some higher weight edge and incoming edge can replace heavier edge in MST and update MST edge weight and then do union for U, V for all edge weights greater than or equal to W.

I got an AC with this approach but not sure if this approach is correct as everybody is mentioning link-cut tree. Can someone confirm if this is correct?

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

Why does this solution to D gives WA (https://atcoder.jp/contests/abc355/submissions/53878525)

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

For problem E, is there any intuitive understanding about the definition of S(x,y) = -S(y,x) when x > y.

I wonder how could someone come up with this definition and construct a graph.