Comments
On AquaMoonCodeTON Round 2, 4 years ago
-8

So will have a re-run?

On AquaMoonCodeTON Round 2, 4 years ago
0

Cool. So it seems Java BigInt can solve it too.

On AquaMoonCodeTON Round 2, 4 years ago
0

Cool. So mine will be ok if I replace int128 to some BigInt-like struct. Thank you.

On AquaMoonCodeTON Round 2, 4 years ago
+3

Thank you! Learned a lot from u.

On AquaMoonCodeTON Round 2, 4 years ago
0

how's that O(2^(n/2)) calculated? can u prove it?

On AquaMoonCodeTON Round 2, 4 years ago
0

Because it seems to be small enough, not the case of 1 million bit, it is like we use bitset for 64 times faster. If a type can hold it, we can simulate it using O(n*n).

On AquaMoonCodeTON Round 2, 4 years ago
0

can java BigInteger or Python pass it?

On AquaMoonCodeTON Round 2, 4 years ago
-8

Problem E can __int128 hold all variables?

Is the word trick kinda glorifying? I don't think so.

And, if actually it can be proved at most a certain amount of updates lead to the minimized answer, then it's not a shenanigan. This is also why I am asking here. I'm not able to construct a case failing the solution.

Besides, early exit is sometimes useful in OI competitions.

Could anyone have a look at this code?

https://mirror.codeforces.com/contest/1706/submission/164815320

The solution got TLE before I added an early exit trick, then it got AC, I have no idea why. It seems that the early exit trick is wrong. So is the data too weak or the early exit is actually correct?

+8

Yeeeeep! No wonder i wrote it so smoothly.

+1

unordered_map sucks! In problem D, unordered_map sol > 2000ms array sol = 143ms, 15x faster Why am I always FST?

Maybe not that easy, I solved problem C and D after contest and it takes me less than 1 hour. Not even longer than the time I spend on the harder problem B that I imagine. But maybe someone else thinks otherwise too.

Or we can print the full answers in a compressed format, it is easy to know that the list of answers can be represented by (Ai, Ci) where i <= N+M which means the next Ci answers are all Ai. In the sample case it is (3, 2), (4, 6), (5, 4).

Don't limit your creativity bro

Yep, but it is POSSIBLE to make it a harder problem by querying part of the answers. For example, make the sum of all N + M not larger than 100,0000 and query no more than 100,0000 of different k.

Problem B actually has a O(N+M) solution, though it is more complicated. I have spent one hour working out this O(N+M) solution because I misunderstood the hell limits of N and M!!!!!!!!!!!!!! Just didn't notice that sum of all N*M does not exceed 1e5 (it really sucks :( Then I have not enough time to submit problem C and I was almost there...

for D2F(D1C), it is quite easy, easier than D2D/D2E, why it is placed in the last problem, and get so much score? my solution is, firstly generate a random permutation as initialization, then brute force search an valid permutation based on this initialization permutation. the solution is very simple and source code is very short. if i know this i will definitly finish D2F earlier than D2D/D2E.