Hi Everyone,
I've tried to solve the CSES — Distinct Values Queries problem based on this StackOverflow answer.
Unfortunately I got TLE for my solution.
Can you guys help me, why I get TLE?
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Hi Everyone,
I've tried to solve the CSES — Distinct Values Queries problem based on this StackOverflow answer.
Unfortunately I got TLE for my solution.
Can you guys help me, why I get TLE?
I just solved the problem Facebook Hacker Cup 2015 — Round 1 — D. Corporate Gifting
My solution used "dp on tree" technique. The naive version would have used entire arrays in nodes that represents a discrete functions with its values. Because for every function all the function values are the same except one value, I can represent it with the common value, index of the difference, and the difference itself. Using this simpler representation the calculation of the sum of the functions will have lower complexity.
I wonder if this technique (of representing discrete functions this way) has some other useful applications. Is there any reading about this topic?
It seems that search function (on the upper right corner of the site) doesn't work for me. I don't get any result even if I enter frequently used phrases like "graph", "tree", "competition". If I get any result it is just one user with the searched phrase. But I'd like to search for blog posts.
Anyway I can search on google, but I'm interested in whether I am the only one who can't use this function of the site, or is it wrong for everybody. In the latter case where should I send feedback to?
Name |
---|