Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
1149 | Codeforces Round 556 (Div. 1) | FINISHED | False | 7200 | 175274699 | April 29, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 791 ) | D | Abandoning Roads | PROGRAMMING | brute force dp graphs greedy | 2900 |
B"Codefortia is a small island country located somewhere in the West Pacific. It consists of n settlements connected by m bidirectional gravel roads. Curiously enough, the beliefs of the inhabitants require the time needed to pass each road to be equal either to a or b seconds. It's guaranteed that one can go between any pair of settlements by following a sequence of roads. Codefortia was recently struck by the financial crisis. Therefore, the king decided to abandon some of the roads so that: The king, however, forgot where the parliament house was. For each settlement p = 1, 2, ... , n , can you tell what is the minimum time required to travel between the king's residence and the parliament house (located in settlement p ) after some roads are abandoned? The first line of the input contains four integers n , m , a and b ( 2 <= q n <= q 70 , n - 1 <= q m <= q 200 , 1 <= q a < b <= q 10^7 ) -- the number of settlements and gravel roads in Codefortia, and two possible travel times. Each of the following lines contains three integers u, v, c ( 1 <= q u, v <= q n , u neq v , c in {a, b } ) denoting a single gravel road between the settlements u and v , which requires c minutes to travel. You can assume that the road network is connected and has no loops or multiedges. Output a single line containing n integers. The p -th of them should denote the minimum possible time required to travel from 1 to p after the selected roads are abandoned. Note that for each p you can abandon a different set of roads. The minimum possible sum of times required to pass each road in the first example is 85 -- exactly one of the roads with passing time 25 must be abandoned. Note that after one of these roads is abandoned, it's now impossible to travel between settlements 1 and 3 in time 50 . "... |
66783 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
54505485 | luogu_bot2 | D | May 23, 2019, 3:22 a.m. | OK | GNU C++11 | TESTS | 107 | 31 | 114688000 | 2900 | |
53536747 | waaadreamer | D | April 30, 2019, 3:09 a.m. | OK | GNU C++11 | TESTS | 107 | 46 | 39936000 | 2900 | |
55424335 | WZYYN | D | June 11, 2019, 8:12 a.m. | OK | GNU C++11 | TESTS | 107 | 62 | 186777600 | 2900 | |
53699079 | Ark_ | D | May 3, 2019, 9:16 a.m. | OK | GNU C++11 | TESTS | 107 | 187 | 39424000 | 2900 | |
53699094 | vjudge4 | D | May 3, 2019, 9:17 a.m. | OK | GNU C++11 | TESTS | 107 | 202 | 39424000 | 2900 | |
64570245 | luogu_bot3 | D | Nov. 9, 2019, 8:55 a.m. | OK | GNU C++11 | TESTS | 107 | 217 | 108748800 | 2900 | |
64570122 | luogu_bot2 | D | Nov. 9, 2019, 8:53 a.m. | OK | GNU C++11 | TESTS | 107 | 217 | 108748800 | 2900 | |
53697936 | Fister | D | May 3, 2019, 8:44 a.m. | OK | GNU C++11 | TESTS | 107 | 218 | 78848000 | 2900 | |
53561007 | ilnil | D | April 30, 2019, 9:30 a.m. | OK | GNU C++11 | TESTS | 107 | 233 | 63385600 | 2900 | |
53836458 | xgzepto | D | May 7, 2019, 3:26 a.m. | OK | GNU C++11 | TESTS | 107 | 234 | 42393600 | 2900 | |
53605072 | m4h | D | May 1, 2019, 9:55 a.m. | OK | GNU C++14 | TESTS | 107 | 31 | 307200 | 2900 | |
57427692 | schtomi97 | D | July 20, 2019, 9:36 p.m. | OK | GNU C++14 | TESTS | 107 | 77 | 38502400 | 2900 | |
55826198 | tmwilliamlin168 | D | June 20, 2019, 10:59 a.m. | OK | GNU C++14 | TESTS | 107 | 77 | 38502400 | 2900 | |
55826158 | tmwilliamlin168 | D | June 20, 2019, 10:58 a.m. | OK | GNU C++14 | TESTS | 107 | 77 | 38502400 | 2900 | |
53522269 | sqrtdecompton | D | April 29, 2019, 3:57 p.m. | OK | GNU C++14 | TESTS | 107 | 77 | 46080000 | 2900 | |
53568047 | ihdignite | D | April 30, 2019, 1:34 p.m. | OK | GNU C++14 | TESTS | 107 | 78 | 38502400 | 2900 | |
53524370 | Marcin_smu | D | April 29, 2019, 4:13 p.m. | OK | GNU C++14 | TESTS | 107 | 93 | 152268800 | 2900 | |
57181483 | emoairx | D | July 17, 2019, 7:23 a.m. | OK | GNU C++14 | TESTS | 107 | 93 | 186777600 | 2900 | |
53518623 | Reyna | D | April 29, 2019, 3:34 p.m. | OK | GNU C++14 | TESTS | 107 | 186 | 75878400 | 2900 | |
53697986 | vjudge4 | D | May 3, 2019, 8:45 a.m. | OK | GNU C++14 | TESTS | 107 | 218 | 78848000 | 2900 | |
53530086 | dorijanlendvaj | D | April 29, 2019, 7:34 p.m. | OK | GNU C++17 | TESTS | 107 | 31 | 409600 | 2900 | |
53529899 | nikolapesic2802 | D | April 29, 2019, 6:49 p.m. | OK | GNU C++17 | TESTS | 107 | 31 | 819200 | 2900 | |
55610324 | ReaLNero1 | D | June 16, 2019, 5:16 a.m. | OK | GNU C++17 | TESTS | 107 | 31 | 2048000 | 2900 | |
53529968 | nikolapesic2802 | D | April 29, 2019, 6:51 p.m. | OK | GNU C++17 | TESTS | 107 | 31 | 2150400 | 2900 | |
53529264 | dorijanlendvaj | D | April 29, 2019, 6:26 p.m. | OK | GNU C++17 | TESTS | 107 | 124 | 7270400 | 2900 | |
53529246 | dorijanlendvaj | D | April 29, 2019, 6:26 p.m. | OK | GNU C++17 | TESTS | 107 | 124 | 8396800 | 2900 | |
53529221 | dorijanlendvaj | D | April 29, 2019, 6:25 p.m. | OK | GNU C++17 | TESTS | 107 | 124 | 10752000 | 2900 | |
53529209 | dorijanlendvaj | D | April 29, 2019, 6:25 p.m. | OK | GNU C++17 | TESTS | 107 | 171 | 19865600 | 2900 | |
53528977 | dorijanlendvaj | D | April 29, 2019, 6:18 p.m. | OK | GNU C++17 | TESTS | 107 | 186 | 101376000 | 2900 | |
53560603 | nickluo | D | April 30, 2019, 9:16 a.m. | OK | GNU C++17 | TESTS | 107 | 233 | 41164800 | 2900 | |
53517564 | Petr | D | April 29, 2019, 3:28 p.m. | OK | Java 8 | TESTS | 107 | 764 | 138956800 | 2900 | |
53649000 | uwi | D | May 1, 2019, 9:57 p.m. | OK | Java 8 | TESTS | 107 | 1138 | 212070400 | 2900 | |
53523650 | Jeel_Vaishnav | D | April 29, 2019, 4:08 p.m. | OK | Java 8 | TESTS | 107 | 1497 | 138854400 | 2900 | |
53528571 | Egor | D | April 29, 2019, 6:09 p.m. | OK | Java 8 | TESTS | 107 | 1622 | 211865600 | 2900 | |
53560344 | dalt | D | April 30, 2019, 9:06 a.m. | OK | Java 8 | TESTS | 107 | 2184 | 435814400 | 2900 | |
54503976 | whatshisbucket | D | May 23, 2019, 1:48 a.m. | OK | PyPy 3 | TESTS | 107 | 1747 | 157900800 | 2900 | |
58045473 | Helli.code | D | July 30, 2019, 10:52 p.m. | OK | Python 2 | TESTS | 107 | 3072 | 208588800 | 2900 |
Back to search problems