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 | 4009 |
2 | jiangly | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
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?