Comments
On McDaMiaIOI 2026 Teams, 4 months ago
0

wtf strong

Why does it have to be on Easter?

On VladiGSegment tree on Time, 6 months ago
+20

As a grammar policeman, I am impressed by my fixing

I'm rooting for ya to get CM before December! Try solving ABCD in less than an hour. It may seem hard, but there are two competitions until the end of November.

Two things from my advice are actually from you

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

Thank you! 😊

There was a competition a week ago that had 6 problems, and solving ABC was really good. So I guess that the standard for Master is to have half of the problems solved, which means all non-quirky problems.

I've noticed a scheme, on national competitions at least, that a handful of people are EXTRA GOOD at solving tasks on those competitions, but are not that good on international level. The supposed reason is that their minds somehow learnt the pattern of the national competitions. My guess is LLMs are good at standard schemes & problems too.

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

Also, my Discord account is entityplantt (proof for IOI server)

Looking at your code. How did I not think of this… I was so close.

I also had the idea to put everything at multiples of $$$63$$$ (you did on $$$64$$$, but close enough), but the way I did it wasn't cost-efficient. I did $$$(i,64\left\lceil\frac i{64}\right\rceil-i),i\in250000,\dots,1$$$

No, it doesn't as a wrong submission. But, I think it counts as participation (source: me)

In your code, how do you traverse $$$i\in l,\dots,r$$$ without TLE?

Apart from a task on BalkanOI 2024 test day, I've never heard of a task with ternary search required. Use binary search on the difference.

No frequency map??

Does anyone have spare time to explain F to me? I thought of sqrt decomp ($$$250000=500^2$$$) or cbrt decomp ($$$250047=63^3$$$). Unfortunately, the closest I got is 15 million robocoins, with the cube root. I don't ask for mathematical proof (99% I can prove it myself), but the idea.

Asking because I underperform in reading other people's code (aka suck at it)

Really makes you stand up from your seat, find a pen and paper and do university-level combinatorics & statistics

You don't get negative delta from not submitting anything on a contest you're registered on.

But one submission, be it WA, TLE or AC and you're done

Works on Firefox too

Congratulations to becoming Candidate Master!

It's not that hard to see that this problem is easier to do with a frequency map.

From observations you can get that when, for some $$$i$$$, $$$f_i \gt k$$$, then you have to move $$$f_i-1$$$ drones from energy $$$i$$$ to $$$i+1$$$, so basically $$$f_{i+1}:=f_i-1,f_i:=1^{(1)}$$$ ($$$:=$$$ means assignment).

Let's define a chain reaction when $$$f_i \gt k$$$, and we advance the drones of $$$f_i$$$ to the right (thus incrementing $$$i$$$) until $$$f_i≤k$$$, leaving a trail of $$$1$$$s behind. At the end, if we started from $$$s$$$ and ended at $$$i$$$, the total number of operations that chain reaction did was $$$i-s$$$. Let's save all trails of ones in an array $$$jump$$$, in the format $$$jump_s=j$$$.

Any chain reaction passing on an existing trail of $$$1$$$s (which starts on position $$$j$$$) will, after $$$jump_j-j$$$ operations, continue from $$$jump_j$$$ without changing the trail (ofc it will leave it's own trail of $$$1$$$s, but $$$1=1$$$, so the elements of $$$f_{j:jump_j}$$$ won't change).

So, our answer to the problem will be the longest chain reaction. Of course, every chain reaction has a constant rate, so no chain reaction can "catch up" to another ongoing, which means it's safe to simulate chain reactions from the right, to the left.

This means we can have a variable $$$s\in{2n,\dots,1}$$$, and we can check if $$$f_s \gt k$$$. If this is true, we start simulating the chain reaction from $$$f_s$$$, with $$$(1)$$$. If we get to $$$i$$$ where $$$jump_i$$$ is set, we can skip a lot of indexes, which saves runtime and reduces energy consumption, thus slowing down global warming. At the end of the chain reaction, if the length of this chain reaction is the largest ever, we save it ($$$m:=max{m,i-s}$$$).

Implementation: codeforces.com/contest/2157/submission/350326830

Your solution works when you have a single testcase, but fails with multiple testcases on one run. Make sure you erase all the data structures and variables you use.

An example on which it fails:

2
20
5 4 7 4 20 4 4 7 2 2 8 1 10 9 11 7 6 2 1 12 
20
16 11 10 3 18 5 14 1 14 12 2 10 3 17 8 6 3 4 11 19

The correct answer is 8, but yours returns 7 on one of these tests.

Please include the link to your submission, so the comment wouldn't be large

TC4 was probably $$$75000 \lt W \lt 10^5$$$, because my submission failed on such testcases.

My idea was to have the first query be $$$1,1,1,\dots$$$, $$$10^5$$$ times, and with that info and some NT I would get the lower and upper bound for $$$W$$$: $$$\lceil\frac{10^5}L\rceil\le W\le\lfloor\frac{N-1}{L-1}\rfloor$$$.

Then for each possible integer $$$W$$$ I would insert two words of length $$$\lfloor\frac W2\rfloor$$$ and $$$\lceil\frac W2\rceil$$$, expecting to have two words per line until the true $$$W$$$, and then (with the true $$$W$$$) to have one word per line.

But it seems to fail above $$$75000$$$ because at that point $$$3$$$ words of size $$$25000$$$ can fit on a line. I tried to fix that but I didn't have sufficient time until the end of the contest.

Let's say you computed a convex hull with the monotonic stack algorithm, and you want to find its diameter, but you haven't merged $$$hu$$$ and $$$hd$$$, the upper and lower half of the hull, respectively. Can we find the diameter by iterating through $$$hu$$$ and $$$hd$$$ simultaneously, with starting indexes $$$i=j=0$$$? It would be an $$$O(|hu|+|hd|)$$$ complexity for the diameter part.

Problem 3 looks like there's now DSU branching. I have a bad feeling that there are gonna be DSU merge conflicts 😂

Before the contest, in the registered tab, there's a warning at the top of the page where it says you are registered unrated. Click Change to Rated there.

On dmraykhanEJOI 2024 Teams, 2 years ago
0

Please update VladiG and mkkkkkkkk to cyan color, they're now specialists

Add Macedonia 2 to the table? Also try to not make it 5 columns :D

Blagoj orz

+13

Contest #2000 on Codeforces! What a milestone

On sasNearest greater element, 2 years ago
0

Why are you asking? What's your concern?

On Aldas25BOI 2024 Mirror Contest, 2 years ago
+5
On Aldas25BOI 2024 Mirror Contest, 2 years ago
0

Day 1 rankings now show rankings for day 2, please update the post

why are you asking? what's your concern?

On CristoforJBOI 2023 Teams, 3 years ago
+1

It is for sure that damjandavkov will win, he got really good results at EJOI!

0

wait so Div. 4 is easier than Div. 3 (or Div. 2 (or Div. 1))? I thought the reverse, but seeing that this competition is rated for participants with rating $$$ \lt 1400$$$, and the previous one (with Vika) is for rating $$$ \lt 2000$$$ or something, I now think this round is gonna be easier..?