There will be online version of the ACM ICPC Phukhet Regional 2013 tomorrow 14:00UTC time. It will be 5 hour contest. You are cordially invited to participate in the contest. Hope you will enjoy the set!
Here is the contest link
# | 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 | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
There will be online version of the ACM ICPC Phukhet Regional 2013 tomorrow 14:00UTC time. It will be 5 hour contest. You are cordially invited to participate in the contest. Hope you will enjoy the set!
Here is the contest link
Name |
---|
Anyone has hints for H? I tried Gaussian Elimination for each query but it was too slow.
The constraint on N was small, so a backtrack or bitset DP of some sort should work.
How do you handle repeating vertices?
That was just a wild guess. Not like I coded anything... (I did the first 1.5 hours of this, then today's CF round and realized that it won't do me any good to train much with no actual competition in sight :D)
We can precompute some special inverse matrix in advance and answer each query in O(n2). This matrix seems to be depend on t but precomputing n matrices still gets TLE. Then I try the same matrix for all t and it passed. I have no idea why :)
I guess, since t is O(n), so generate O(n) matrices each of size O(n^2). And also do the gaussian elimination in O(n^6) per matrix to answer each query O(1). Am I mistaking?