Hello CodeForces, I am curious about how people tackle such problems but cant find resources (at least with a very brief google search). I would appreciate it if someone provided me with some.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 166 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
Hello CodeForces, I am curious about how people tackle such problems but cant find resources (at least with a very brief google search). I would appreciate it if someone provided me with some.
La Paz is clearly no place to host IOI. (It has already been talked about but I wanted to reignite the discussion.) https://mirror.codeforces.com/blog/entry/128667 by E869120 explains the issue thoroughly.
This is the first time I see pdf editorials for a round that is not for ICPC or similar contest. I love the format and just wanted to support the setters by writing this blog.
Hello CodeForces, today I was solving the problem 1985H2 - Maximize the Largest Component (Hard Version) and implemented it with C++. It passes all the tests seperately but throws RE when I try to run multiple tests. I have been debugging for around half an hour but can't find the problem. I would appreciate any help. Here is my submission:268092158
PS: Local compiler also throws RE.
The submission is here: 265738238
I do not think that I use significant stack memory here, it is mostly heap memory. Also I have cloned to the mashup to test with 2GB memory limits and got exactly the same result.
The code is pretty clear in my opinion but I will be happy to clarify if asked.
Thanks for your interest.
Hello CodeForces, today I tried solving the problem from a recent contest: 1923E - Count Paths
My Solution:
Use centroid decomposition to count the paths, for a given centroid, we keep track of the nodes we see first with a certain color and count the paths accordingly. Because colors go from 1 to N, we can use array instead of map. So I figured the time complexity would be O(N lg N). But the solution TLE's.
If you see any problems with the code, please let me know as I can't see the problem. If you don't understand a part of the code, please ask and I will clarify.
Submission: 255437477
UPD: The runtime takes more than 30 seconds! So I guess the runtime is O(N^2) somehow.
Name |
---|