Comments

I used a Fenwick Tree for all of problems E, F and G.

On pinely → Pinely Round 5 (Div.1 + Div.2), 11 months ago
0

Thank you for testing my code. In fact, the test cases I provided earlier were actually my own counterexamples, but they were illegal data. My code was also developed without the constraint that $$$a_i \lt = X$$$. I made a mistake in interpreting the constraints of the problem.

On pinely → Pinely Round 5 (Div.1 + Div.2), 11 months ago
0

Sorry, I overlooked the restrictions of the question. Nevertheless, I still feel that my code is not quite correct.

On pinely → Pinely Round 5 (Div.1 + Div.2), 11 months ago
+3

Why is hacking of question C prohibited? I passed the test 346709015, but I later discovered that there were issues with my code, such as 1 4 4 3 3 3 10 The answer might be 19, but my output was not that.

In fact, it's the same. Because in your situation, there must be $$$p_{i-2} \gt p_i$$$. So whether it's for $$$p_i$$$ or $$$p_{i-1}$$$, they are both the second to last element. The impact on the subsequent part is the same.

+2

Why did D come up with the idea of binary search? Who can prove the continuity of the answer? I feel that I cannot understand the correctness of binary search.

On platelet → CodeTON Round 5 Editorial, 3 years ago
0

I think the solution to D is too vague, and doesn't explain the specific meaning of the dist array!

0

Can we determine the answer by asking for three vertices For problem C

On Aris → Codeforces Round #820 (Div. 3), 4 years ago
0

Thanks to this competition for making me an expert。

C feels amazing, I can only think of BFS to solve it

I got wa three times for this

How to prove that C's approach is correct

What a pity. I could have made a D

On huangzirui → Codeforces Round #796, 4 years ago
-10

I agree. Div2C is a great idea

On huangzirui → Codeforces Round #796, 4 years ago
+1

Don't lose heart. Keep in touch and you'll be able to solve it easily

On huangzirui → Codeforces Round #796, 4 years ago
0

Who can tell me why my friend passed the question in the contest but didn't get A rating change (not 0)? Another friend of mine checked question A 7 times but didn't get A rating change either. Who can tell me the scoring rules? thank you

Thanks to div2, I became a pupil

The heart is too anxious to miss green name. Too many penalties。 But the experience is better