Problem 144D Codeforces Round #103 (Div. 2)
Here is my submission.
Rewrote Dijkstra already 3-4 times (not enough?)... but I think I am doing something wrong with SortedList.
Thx.
Problem 144D Codeforces Round #103 (Div. 2)
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | adamant | 152 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 144 |
| 5 | errorgorn | 141 |
| 6 | cry | 139 |
| 6 | Proof_by_QED | 139 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
| Name |
|---|



I am from Java ,so dont know much about the c#.However I think there is a problem in your implemtation in Dijkstra.
When I swapped :
sl.Remove (new pair (dist [p.fst], p.snd));
with
dist [p.fst] = weight + p.snd;
It passed the 10th test case but failed on the 12th.Here's my submission.__
your program needs to clear memory before exit, and this process is very slow, i think.
I think maybe SPFA is a good way to solve this problem.