Всем привет!
Сегодня 15:00 MSK состоится личное соревнование.
Приглашаю всех поучаствовать и предлагаю обсудить задачи после контеста!
№ | Пользователь | Рейтинг |
---|---|---|
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 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
Всем привет!
Сегодня 15:00 MSK состоится личное соревнование.
Приглашаю всех поучаствовать и предлагаю обсудить задачи после контеста!
Название |
---|
Решил все задачи контеста :) до 3 минуты окончание раунда. Первый раз жизни. Я в top100
Approaches for Task E : Grouping http://arc067.contest.atcoder.jp/tasks/arc067_c ?
denotes number of ways of putting people in groups of size . where denotes number of ways to distribute people in groups of size .
.
Answer is .
How to solve F?
First observation : a solution will visit a range of restaurants, pick the best meal for each ticket in the range, and pay the distance from the start to the end of the range.
It is possible to compute the optimal solution for a range in O(m) time using m range maximum queries and subtracting the distance. This gives a O(n^2 m) algorithm. It is possible to improve it to O(m n log(n)) with divide and conquer optimization.
Code for D&D optimization :
what are the transitions for your DP before D&C optimization? Rafbill
Let's for each pair (restaurant; ticket number) find all segments of restaurants, on which this pair will be used. To do so we can use standard algorithm with stack, to find nearest restaurants with better meals for this tickets. Let's call position of our restaurant pos, and these two restaurants rightPos and leftPos. Our pair will be used on segments with left border [leftPos + 1;pos], and right position [pos;rightPos - 1]. To find values for each segment we can just add value of all pairs in correspounding rectangles in [leftPos;rightPos] plane. It will work in O(n2 + nm)
Can the editorials be provided in English as well?
Problem C was very good, and I can solve it for O(N log N). Is there more efficient algorithm like O(sqrt(N))?