I have been stuck in the blue color for 10 months lol. A long way to GM to go but I'll make it possible :D
# | User | Rating |
---|---|---|
1 | tourist | 3690 |
2 | jiangly | 3647 |
3 | Benq | 3581 |
4 | orzdevinwang | 3570 |
5 | Geothermal | 3569 |
5 | cnnfls_csy | 3569 |
7 | Radewoosh | 3509 |
8 | ecnerwala | 3486 |
9 | jqdai0815 | 3474 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 174 |
2 | awoo | 164 |
3 | adamant | 162 |
4 | TheScrasse | 160 |
5 | nor | 158 |
6 | maroonrk | 156 |
7 | -is-this-fft- | 152 |
8 | orz | 146 |
9 | pajenegod | 145 |
9 | SecondThread | 145 |
I have been stuck in the blue color for 10 months lol. A long way to GM to go but I'll make it possible :D
Hi guys, I've been introduced to dynamic connectivity for a long time, especially dsu rollback which can be operated in O(log n) for updating and asking the root. Now, I'm facing with a problem with the edges stricting to only attach i and i + 1 and since the time limit is tight, I may have to do in O(1) (I'd tried the above one but it didn't work).
I was introduced to using left right for this at the same time, however it comes to a problem that the range that I get when updating some edges nearby isn't just what I've expected.
For example, I have 5 nodes here:
If I use edge (3, 4), (4, 5), (1, 2) and (2, 3) accordingly then there exists a position u which left[u] != 1 or left[u] != 5.
Please let me know where I implement wrong or prove that it's impossible to optimize it into O(1) for both updating and getting the longest range that u is covered.
vector <int> lef_m(n), rig_m(n);
vector <pair <int, int>> rollback;
auto Rollback = [&] {
while (not rollback.empty()) {
int u, v; tie(u, v) = rollback.back();
rig_m[u] = u; lef_m[v] = v;
rollback.pop_back();
}
};
auto Join = [&] (int u, int v, int temp) {
if (rig_m[u] >= v) return;
if (temp) rollback.emplace_back(u, v);
rig_m[u] = rig_m[v];
lef_m[v] = lef_m[u];
};
Before this happened, I had been training nonstop for like 200 days (as you can see here)
and after more than half a year, I became an expert from a pupil
I always want to become CM or M before VOI happens and even though it may be hard to achieve, I'm gonna try as best as I can. It was an accident when I forgot to maintain my streak, however, I realised that not every time training gives benefits so this may be a short break for me lol. Anyways, wish me luck on my near future.
Let's see if I can do that in one day soon (I'll come back when I finish this achievement).
Name |
---|