№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | gyh20 | 3447 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | awoo | 161 |
2 | maomao90 | 160 |
3 | nor | 157 |
4 | atcoder_official | 156 |
4 | cry | 156 |
6 | -is-this-fft- | 155 |
7 | maroonrk | 154 |
8 | adamant | 153 |
9 | Um_nik | 151 |
10 | djm03178 | 146 |
Название |
---|
The contest starts in 20 minutes, the online mirror starts in 50.
There will also be a live stream on ICPC Live
How to solve B, D, H, J and K?
J: Make a segment tree that tells us for every interval how many removals we need to make to make that interval of posts into a alternating sequence that starts with negative / positive and ends with negative/positive. Combining this information is trivial.
Initially each post must either be deleted or have the sign it initially has. Loop the amount of new accounts we create, when the number of accounts goes over $$$abs(votes_i)$$$, that position in the segment tree can now have any sign, so we update it. Every position gets updated at most once, and the segment tree operations work in $$$O(\log n)$$$, so that's our time complexity.
D: For each edge count, find the shortest path with exactly this many edges when ignoring the constant x that is added to each edge. The actual length of such a path is then a line equation in terms of x. You then need to find all the lines which are minimal for at least one value (kind of like in the convex hull trick). Finally you need to find all the vertices which are on at least one of these paths.
You can also see the solution presentation if you skip back in the live broadcast.
Did anybody manage to solve B?
Idk if my solution is correct, but I did manage to squeeze it in 4s
I maintained all possible subtree sizes with a specific height by a vector of intervals. To get lexicographically smallest subtree I just checked if a specific prefix is possible. This needs some nasty optimizations because in almost all cases dp value is just one interval, but not always. Can anyone find a counter test for my solution?
I tried to write $$$O(n\log n)$$$ and got WA, but $$$O(n\log^2n)$$$ passes easily anyways. Designate a set of nodes such that none of them may be erased, and try adding nodes to this set in DFS order. After adding a node to the set, test whether the minimum possible size of a BBST containing all nodes in the set has size at most $$$k;$$$ if not, remove the node from the set.
Code
UPDATE: Here's $$$O(n\log n)$$$ (apparently it's slower tho lol)
Code
It's also possible in linear time.
What did happen with Oxford team ? They had 5 harder before frozen, and currently they are not on the leaderboard.
I'm not exactly sure, but they were not finals-eligible. Maybe they got disqualified
.
Will this contest be put into gym/opentrains for virtual participation?
In theory anyone can do it. The problem packages are available on the site: http://www.nwerc.eu/ -- most of the jury are travelling back from NWERC to our normal lives today. If nobody else has added the packages to Codeforces by the weekend, I can do it.
You can also find the questions on Kattis already because like usual they hosted the semilive contest for us: Problems from Northwestern Europe Regional Contest