Comments
On CocoCatHelp me out, y'all., 3 months ago
0

practice on real contests more, do virtual rounds at least once a week

sure, why not

On The_Sahil_RanaGRAPH VISUALIZER, 4 months ago
0

very useful, thanks!

Don't know whether it's mentioned in the video, but I love the idea that the structure of Fenwick tree is basically the segment tree with every right segment removed.

On YF_YUSUFdefine tierlist, 4 months ago
0

I'd go for #define ll int

Alternative proof for problem C that there's no such $$$x = k_1 - k_2$$$, that

$$$ \begin{cases} x \equiv 0 \pmod n \\ x \equiv 1 \pmod m \\ \end{cases} $$$

Let's write down numbers $$$0, n, 2n, \ldots \pmod m$$$. They all have a remainder 0 modulo $$$n$$$.

We need to find such $$$k \cdot n \equiv 1 \pmod m$$$. Here, we can apply $$$\gcd$$$ rule, which says that if we have numbers $$$a$$$ and $$$b$$$, $$$a \bmod b$$$ is divisible by $$$\gcd(a, b)$$$. (If you wish I can prove it too).

But since $$$\gcd(n, m) = 2$$$, all numbers $$$0, n, 2n, \ldots \pmod m$$$ are divisible by 2, so there's no $$$1$$$ in that series. Thus, no such $$$x$$$ exist.

Thank you so much for such a good tool! I'll definitely use it!

On potatoArmyTraining group, 5 months ago
0

Thank you so much!

Thanks for fast editorial and beatiful contest. Problem D was amazing! It actually blew my mind.

Thanks!!!