Comments
On BernatPCodeforces Global Round 29, 7 months ago
+22

that hurts bro

On BernatPCodeforces Global Round 29, 7 months ago
+20

as danx boyfriend, Esomer is the sexist (and sexiest) tester in the world, only cause Dalek_of_Rivia has not tested yet

On EsomerCAMA contest 2nd edition, 17 months ago
0

to the king

On EsomerCAMA contest 2nd edition, 17 months ago
0

to the ring

On EsomerCAMA contest 2nd edition, 18 months ago
+1

The only cama I wanna go in is in yours

0

Thanks

0

Which is my prediction?

Oh ok, thanks :)

On MKasirlooMy view when coding, 22 months ago
+6

My coding when view

Spoiler

And how do you create them and check wether they are correct?

+1

I think this solution fits with the constraints.

First of all you create an array ps where ps[i] = ps[i-1]+(a[i]^b[i]), ps[0] = a[0]^b[0].

Since reversing the segment i, i+1, ..., j-1, j, is the same as reversing i+1, i+2,..., j-2, j-1 and then reversing i and j, you can use this to calculate all the options of reversing a segment centered on position x on O(n). You just have to add the xor of the extremes inversed in each operation. And then use the array ps to add the part that have not been reversed.

After that you should iterate again over a and do almost the same but instead of checking segment of odd length, check the ones with even length.

The total complexity of this is O(n^2)

Is it going to be possible to upsolve after the mirror ends?

+5

Since no official editorial has been published i can help you.

Hint 1
Hint 2
Solution

If you have any doubt, or I didn't explain well something, ask me.

On marzipanGood Bye 2023, 2 years ago
0

Yes hahaha, in fact i've got tle on test 5. I don't know why, but maybe it was just not suposed to get accepted

On marzipanGood Bye 2023, 2 years ago
0

I know there are another solutions and in fact I don't think this is the intended. But the one that I've used is this one:

Okay you know that $$$a \lt b$$$. They are the biggest divisors of $$$x$$$, if we don't count $$$x$$$. So it means that $$$b \cdot e = x$$$, where $$$e$$$ is the smallest divisor of $$$x$$$. So if we find $$$e$$$, we can know $$$x$$$. So the key is how to find $$$e$$$. We can be sure that either is in the decomposition into prime numbers of $$$a$$$ or $$$b$$$. This is because if $$$e^{2]$$$ divides $$$x$$$, $$$e$$$ is going to divide $$$b$$$ too, but if not, $$$e$$$ is going to be divided by $$$a$$$.

So you can just iterate over primes until we reach one that divides $$$a$$$ or $$$b$$$.

0

beta detected opinion rejected

Regards to Jinping.

PS: Bing Chilling

It's normal, he's french

On danxCAMA 2023 Editorial, 2 years ago
+5

Thanks, we are glad you like the problems. Hope to see you participating in the next edition :)

orz

Delete telegram

On Hectorungo_18Volunteers needed, 3 years ago
0

I don't really know, maybe smoke signals

Hahahaha, thanks bro.

You can see what society is becoming.

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

0

Hi everyone,

As a contestant I found that the test in the probem F wasn't good enough. I have all the prestest passed, but then somebody hacked me, so I checked what was the problem with my code and it was the size of a variant. I needed to put long long int and I used int, I think that it should give me wrong answer in a pretest, but it didn't.