Anybody took part in NAIPC 2016? Let us discuss the problems here.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Anybody took part in NAIPC 2016? Let us discuss the problems here.
Name |
---|
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