The legends say that participating Blitz Rounds , Increases your choice of getting a higher rank on competitions in general.
In the honor of kimononawa , the writer of Eolymp Blitz 12 , and the main lore goes to D. Permutation Minimize Product where it used the same idea and framework of Today's 2D/1B .
Editorial of The origin problem : Editorial
So , Indeed If you've seen the task (the technique in general tbf) , then it's very doable in this case.
The problems are similar because they both are using the fact that if $$$a \times b \lt n$$$ then one of $$$a$$$ and $$$b$$$ should be less than $$$\sqrt{n}$$$, hence in each pair $$$(i,j)$$$ one of $$$a_i$$$ or $$$a_j$$$ is less than $$$\sqrt{n}$$$









how is it similar with today's Div2 D ? I don't find any similarity by reading the problem statement
They both are using the fact that if a * b < n then one of a and b should be less than sqrt(n), hence in each pair i,j one of a[i] or a[j] is less than sqrt(n)
orz
Please, time traveling to the future is not allowed kimononawa
Such actions should result in a ban
I'm gonna test more contests!
Submission in case you're curious
362534389
Definetly helped me solve today. Just another proof that we all should do more eolymp contests.
Hmmm... https://eolymp.com/uk/problems/12265 ... If you go to the analysis tab, you can see that you provided an analysis for a similar task that was previously on this site.
https://mirror.codeforces.com/contest/1520/problem/D -- But initially, there was this task.
But that is another idea, not the sqrt decomposition thing.
Yes, this task is much easier, and I remembered the idea after looking at the task. I remembered seeing a similar task. But the thing is, a similar task was already given in the Eolymp round, and the coordinator is now writing that it coincides with the idea from the last Blitz Round 12. And the contest where there was a similar task was also coordinated by this person.
I dont see the issue here, this is a well-known technique and it was used before. The cool thing is that the people from the eolymp contest had the idea frech in mind so they probably a lot easier than others.
Yes, there are enough tasks on this topic. By the way, it's more obvious here than in the Blitz Eolymp 12 task, when I didn't come up with this idea during the contest. I thought about it, but my goal was to get into the top 10.
The idea also appeared in a previous div1.B