Anybody took part in NAIPC 2016? Let us discuss the problems here.
№ | Пользователь | Рейтинг |
---|---|---|
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 |
Anybody took part in NAIPC 2016? Let us discuss the problems here.
Название |
---|
What is the idea behind the inversion problem?
Imagine the product of a0x0, a1x1, ..., an - 1xn - 1 and b0x0, b1x - 1, ..., bn - 1x - n + 1. If ai is 1 if s[i] is A and bi is 1 if s[i] is B, then the coefficients of xi would be the answer for i-inversions.
You can shift the second expression to get a valid polynomial (get non-negative exponents multiplying it by xj). Then you can solve it by FFT. If you shifted by j, then answer for k-inversion will be coefficient of xj + k.
Auto comment: topic has been updated by Ra1nWarden (previous revision, new revision, compare).
Hi :)
Any ideas for problem B or problem J?
Problem B was solved by almost 30 teams but I don't find the correct approach :[
B: Suppose you know the number of digits for each start and end, then it is easy. We can assume they have 1 digit at first, then get the answer, and then you may find some start/end need more digits. Then you can update them and solve again. You do this again and again till it will not change. Each start/end can only increase few times, so the complicity is O(n^2 * log(n))
J: For each grid square, we can compute, what is the latest time a marker has went over this square?
Now, for a square that needs to be colored, the marker can't dry out before the latest time we touch this square, so we know the minimum time the marker needs to dry out is at least the maximum of all these values.
On the other hand, for a square to be blank, the marker needs to dry out before the latest time we touch this square, so we know the maximum time the marker can dry out is at most the minimum of all these values.
If minimum time > maximum time, it's impossible, otherwise, we can output these two numbers. Of course, computing the latest time the marker hits each square is the tricky part, but one hint is to use segment trees.
Where can I upsolve the problems?
Here! : https://naipc16.kattis.com/problems
I'm not sure if you can submit from there if you're not a participant. You can try here instead if that doesn't work: https://open.kattis.com/problem-sources/North%20American%20Invitational%20Programming%20Contest%202016?order=authrat