text
stringlengths
1
654k
• »
»
4 years ago, # ^ |
  Vote: I like it -10 Vote: I do not like it
SQRT Descomposition is a data structure, while Mo's Algorithm is more a technique.
• »
»
»
4 years ago, # ^ |
  Vote: I like it 0 Vote: I do not like it
Not really much of a proof. SQRT-decomposition on queries isn't so much of a data structure, but is still usually meant to be called SQRT-decomp
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it
I got stuck with the problem 446C — DZY Loves Fibonacci Numbers and here's my submissions
could someone help ?
thanks in advance
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Can 13E - Holes solved using MO's algorithm? Or There are other kind of Sqrt-Decomposition? I have solved the first two in the list. But can't find an idea about this one.
• »
»
3 years ago, # ^ |
  Vote: I like it 0 Vote: I do not like it
You know what, there is this thing called editorial for (almost) every round which explains how to solve the problems.
• »
»
»
3 years ago, # ^ |
  Vote: I like it 0 Vote: I do not like it
Thank you. I read the editorial before the comment. But their solution doesn't feel like the MO I learnt. And this problem is listed here. So I asked here if the solution is general, there might be some name or insights available that I want to know before solving it.
• »
»
3 years ago, # ^ |
  Vote: I like it +8 Vote: I do not like it
It is explained there 23:05
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it
242E - XOR on Segment can also be solved with SQRT-decomposition. Although it's slower than the intended solution, it can still AC.
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it
One more very nice SQRT-decomposition problem I encountered at the Innopolis Open Elimination round (2016-2017): http://codeforces.com/gym/101182/problem/E
»
2 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it
Is it better to use const value for the sqrt (i.e 350) or to use sqrt function on n ?
»
2 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it
Why i am getting TLE at 220B - Little Elephant and Array? My Submission 29417078 .Could anyone help me!
Edited: I have changed my solution from map to array.But this also gives me a TLE! 29417554
• »
»
2 years ago, # ^ |
  Vote: I like it 0 Vote: I do not like it
Maybe you have to create a struct for the query, add and remove method you can improve it because you have a lot process and you can put this in you cmp.
bool cmp(const query& p,const query& q){
if(p.l/nb != q.l/nb)
return p.l/nb<q.l/nb;
return ((p.r<q.r)^((p.l/nb)&1));
}
»
2 years ago, # |
  Vote: I like it +5 Vote: I do not like it
https://www.codechef.com/AUG17/problems/HILLJUMP Another good problem on this topic.
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it
It's great to see guys like you guide beginners like us ! Thank you so much !
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it
446C DZY Loves Fibonacci Numbers gives TLE with sqrt decomposition. My code gives TLE although its complexity is O(N*sqrt(N))?? Any help would be appreciated.
• »
»
2 years ago, # ^ |
  Vote: I like it +1 Vote: I do not like it
I don't find your mistake, but i know easier way to solve it.
See my code.
Main idea : divide queries in sqrt(m) blocks.
• »
»
»
2 years ago, # ^ |
  Vote: I like it 0 Vote: I do not like it
I saw your code. Your Idea is cool. But your code and mine have literally the same complexity.
• »
»
»
»
19 months ago, # ^ |
  Vote: I like it 0 Vote: I do not like it
Change long long to int I was also getting tle on this problem because of this
»
21 month(s) ago, # |
  Vote: I like it 0 Vote: I do not like it
Another good problem on this topic: Chef and Graph Queries