The problems:
My thoughts:
Magic Portals
Surprise Birthday
Roaming
Please help me in getting a solution to each of these problems.
Note: Contest ended a long time ago so don't worry about possible cheating.
# | User | Rating |
---|---|---|
1 | jiangly | 3898 |
2 | tourist | 3840 |
3 | orzdevinwang | 3706 |
4 | ksun48 | 3691 |
5 | jqdai0815 | 3682 |
6 | ecnerwala | 3525 |
7 | gamegame | 3477 |
8 | Benq | 3468 |
9 | Ormlis | 3381 |
10 | maroonrk | 3379 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | -is-this-fft- | 165 |
3 | Um_nik | 160 |
4 | atcoder_official | 159 |
5 | Dominater069 | 158 |
5 | djm03178 | 158 |
7 | adamant | 153 |
8 | luogu_official | 150 |
8 | awoo | 150 |
10 | TheScrasse | 147 |
Three problems I need help in solving
Since the maximum possible number of pairings is $$$10395$$$, I could just check all possible pairings for a cycle. But I'm not sure how I would implement this.
I have no clue. I do not think a brute force would work here.
I can precalculate shortest paths between the pharmacies, fixing the starting and ending. Then for every other vertex, I could take the minimum over all choices of starting and ending pharmacies. Then I could take the overall minimum. It works, but I'm having trouble implementing so much neatly.
Please help me in getting a solution to each of these problems.
Note: Contest ended a long time ago so don't worry about possible cheating.
Name |
---|