Comments

For example, we select a set of vertices and assume all of them are dangerous. If we are able to find a simple path (we can't visit the same vertex again) that connects the set of vertices, such that the path contains 3 or more vertices that are dangerous, then we remove it from our result.

In other words, if we connect two vertices from that set through a simple path and any other dangerous vertex lies on that path, then that set is removed.

For instance, in the second test case, we didn't remove {1, 2, 4} because there is no simple path that can cover all three of them. But in the case of {2, 3, 4}, we have a simple path.

I was able to come up with something similar, but I thought there would be cases where overlaps would occur and didn't manage to come up with any way to resolve them. Your explanation provides oversight in my eyesight.

On frozenblade → Profound sadness..., 3 years ago
0

Sir, what is your secret to gaining profound insights into the concerns of ordinary beings?

But you are lgm already.

Jesus Christ, that's an amazing profile bud.

How do we merge the XOR of two different nodes? What about the possibilities of XOR generated by nodes that appear before the LCA but are not part of the simple path between the two nodes? How is this taken care of during the merging process?

Great Idea to express that in the username xd

Same approach bud! That's giving me wrong answer on test 5.

since the value at y is smaller than the value at 1(if I am not wrong). Good explanation bud.

On Kevin114514 → Congratulations!, 3 years ago
+8

Congrats! blackyuki for such a unique last-moment clutch.

On TrendBattles → Journey to Grandmaster, 3 years ago
0

There is a biological barrier but we can strive until the barrier is reached.

On Smirk → jiangly changes his pfp!, 3 years ago
0

LGM at full potential.

On ssk4988 → How to not become a Master, 3 years ago
+8

Now, you are master.

On Kevin114514 → I'm Kevin114514, AMA!, 3 years ago
0

I read the translated page. School seems pretty strong. I guess cnnfls_csy(Siyuan Cheng) is also from this school.

Dammn, you actually know how to roast.

Love your profile picture

Imagine how painful life is for LGMs

I don't remember a lot. But, the contest(Codeforces Round 885 (Div. 2)) was hard for me. Contest of love(Vika).

I am not able to implement C on time. But this is not the hardest.

On oursaco → Revenge at Last, 3 years ago
+3

That will be a great plot for progression fantasy. I was hoping you will kill him. Then we will get your redemption arc.

On oursaco → Revenge at Last, 3 years ago
0

"I don't even remember who you are"

I should say this book can teach you how you can prove your solutions using mathematical means. I think that proving your approach is very helpful in developing an intuitive understanding.

I was reminiscing about Luo Tianyi's Vocaloid while solving the contest.

That's really helpful for the topics I need to study.

On manthan → Rank_1 Codeforces, 4 years ago
+10

Your code is easy to understand. I really look forward to your code whenever I am stuck. Your code is available for most questions, that's really rewarding.

My contest went bad. But the overall quality of the problems are really good. I really appreciate the tutorial format too :)

Well, after practicing reasonably you will start to get the intuition to approach a problem, that intuition can be wrong or right. To check whether you are on right track you should think about the idea of intuition and prove it mathematically or intuitively. Coming back to your question. Yes, we rely on our intuition. But along with that, we prove our solution too.

On nHimanshu → Hard work in cp, 4 years ago
+1

I am comfortable with a range of difficulties. I usually solve around 1400-1700. But sometimes I have difficulty coming up with observations for elementary problems(around 1000-1300). But I can easily solve them but in contests I sometimes face difficulties. It leads to inconsistent performance in contests.

Finally, the opportunity presents itself. I will become a newbie again.

Subscribed!!! Really nice :)

Monogatari, Steins Gate, Attack on Titans, One Outs

Probabaly it's quite hard to answer this

On QAQAutoMaton → IOI2022 China Team, 5 years ago
+13

I was not into informatics in my highschool but into Maths Olympiad. That's how I know China (their IMO team is also orz...XD)

On QAQAutoMaton → IOI2022 China Team, 5 years ago
+8

OddImage will win IOI2022!

On QAQAutoMaton → IOI2022 China Team, 5 years ago
+14

hehezhou will win IOI2022!

On QAQAutoMaton → IOI2022 China Team, 5 years ago
+47

137_345_2814 will win IOI2022!

I don't even know my zodiac sign. Should I go and check...if I am enough qualified to become a CM

On robot_bobot → Cheaters on Codeforces, 5 years ago
+1

In the end they are not going to get anything.

That sounds very familiar, This is the usual exam duration (3 hours) and 3 hours looks ideal to me. We can even add more problems to make difficulty gradient better.