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 |
---|---|---|---|---|---|---|
908 | Good Bye 2017 | FINISHED | False | 9000 | 217261199 | Dec. 29, 2017, 3:40 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1400 ) | F | New Year and Rainbow Roads | PROGRAMMING | graphs greedy implementation | 2400 |
B"Roy and Biv have a set of n points on the infinite number line. Each point has one of 3 colors: red, green, or blue. Roy and Biv would like to connect all the points with some edges. Edges can be drawn between any of the two of the given points. The cost of an edge is equal to the distance between the two points it connects. They want to do this in such a way that they will both see that all the points are connected (either directly or indirectly). However, there is a catch: Roy cannot see the color red and Biv cannot see the color blue. Therefore, they have to choose the edges in such a way that if all the red points are removed, the remaining blue and green points are connected (and similarly, if all the blue points are removed, the remaining red and green points are connected). Help them compute the minimum cost way to choose edges to satisfy the above constraints. The first line will contain an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300 xe2 x80 x89000), the number of points. The next n lines will contain two tokens pi and ci (pi is an integer, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109, ci is a uppercase English letter 'R', 'G' or 'B'), denoting the position of the i-th point and the color of the i-th point. 'R' means red, 'G' denotes green, and 'B' means blue. The positions will be in strictly increasing order. Print a single integer, the minimum cost way to solve the problem. In the first sample, it is optimal to draw edges between the points (1,2), (1,4), (3,4). These have costs 4, 14, 5, respectively. "... |
Good Bye 2017 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
33852238 | slavik228 | F | Jan. 1, 2018, 5:43 p.m. | OK | FPC | TESTS | 44 | 296 | 23552000 | 2400 | |
33852224 | slavik228 | F | Jan. 1, 2018, 5:43 p.m. | OK | FPC | TESTS | 44 | 312 | 23552000 | 2400 | |
34072766 | wh2001_ZY | F | Jan. 10, 2018, 4:07 p.m. | OK | GNU C++ | TESTS | 44 | 31 | 3584000 | 2400 | |
34694138 | luogu_bot2 | F | Jan. 30, 2018, 1:24 a.m. | OK | GNU C++ | TESTS | 44 | 31 | 4505600 | 2400 | |
33977921 | tangsan Hank2006 zhulingjun | F | Jan. 7, 2018, 7:12 a.m. | OK | GNU C++ | TESTS | 44 | 31 | 4505600 | 2400 | |
33826814 | somebody_else fxt tangsan | F | Dec. 31, 2017, 7:38 a.m. | OK | GNU C++ | TESTS | 44 | 31 | 4505600 | 2400 | |
33813111 | redbag | F | Dec. 30, 2017, 3:46 p.m. | OK | GNU C++ | TESTS | 44 | 31 | 4505600 | 2400 | |
33788533 | lzr_010506 | F | Dec. 29, 2017, 5:43 p.m. | OK | GNU C++ | TESTS | 44 | 31 | 4812800 | 2400 | |
33798113 | lyx_cjz | F | Dec. 30, 2017, 12:58 a.m. | OK | GNU C++ | TESTS | 44 | 31 | 6860800 | 2400 | |
40978786 | ReaLNero1 | F | July 30, 2018, 4:47 p.m. | OK | GNU C++ | TESTS | 44 | 46 | 2764800 | 2400 | |
33800694 | Tgotp | F | Dec. 30, 2017, 4:41 a.m. | OK | GNU C++ | TESTS | 44 | 46 | 6860800 | 2400 | |
34696407 | zhan8855 | F | Jan. 30, 2018, 3:34 a.m. | OK | GNU C++ | TESTS | 44 | 77 | 11878400 | 2400 | |
33880032 | laofudasuan | F | Jan. 3, 2018, 7:43 a.m. | OK | GNU C++11 | TESTS | 44 | 31 | 2048000 | 2400 | |
33789630 | Bleizer | F | Dec. 29, 2017, 5:54 p.m. | OK | GNU C++11 | TESTS | 44 | 31 | 3584000 | 2400 | |
43112187 | Anson529 | F | Sept. 20, 2018, 12:11 p.m. | OK | GNU C++11 | TESTS | 44 | 46 | 307200 | 2400 | |
46706107 | Heaplax | F | Dec. 7, 2018, 7:14 a.m. | OK | GNU C++11 | TESTS | 44 | 46 | 4812800 | 2400 | |
37365263 | GuYueNa | F | April 16, 2018, 5:09 a.m. | OK | GNU C++11 | TESTS | 44 | 46 | 5836800 | 2400 | |
37365257 | _SHENZHEBEI_ | F | April 16, 2018, 5:09 a.m. | OK | GNU C++11 | TESTS | 44 | 46 | 5836800 | 2400 | |
37365201 | _SHENZHEBEI_ | F | April 16, 2018, 5:03 a.m. | OK | GNU C++11 | TESTS | 44 | 46 | 5836800 | 2400 | |
33798399 | great_influence | F | Dec. 30, 2017, 1:28 a.m. | OK | GNU C++11 | TESTS | 44 | 46 | 14131200 | 2400 | |
33790300 | __math | F | Dec. 29, 2017, 6 p.m. | OK | GNU C++11 | TESTS | 44 | 46 | 19046400 | 2400 | |
33803884 | choutii | F | Dec. 30, 2017, 8:02 a.m. | OK | GNU C++11 | TESTS | 44 | 62 | 2048000 | 2400 | |
33826156 | LiChenKoh | F | Dec. 31, 2017, 6:52 a.m. | OK | GNU C++14 | TESTS | 44 | 31 | 4300800 | 2400 | |
37185214 | cghAndy | F | April 11, 2018, 3:09 a.m. | OK | GNU C++14 | TESTS | 44 | 46 | 8192000 | 2400 | |
37185179 | cghAndy | F | April 11, 2018, 3:05 a.m. | OK | GNU C++14 | TESTS | 44 | 46 | 8192000 | 2400 | |
33840609 | FizzyDavid | F | Jan. 1, 2018, 1:19 a.m. | OK | GNU C++14 | TESTS | 44 | 61 | 13107200 | 2400 | |
33804543 | Tooc0ld | F | Dec. 30, 2017, 8:37 a.m. | OK | GNU C++14 | TESTS | 44 | 93 | 1843200 | 2400 | |
34801881 | dream_cloud | F | Feb. 1, 2018, 12:20 p.m. | OK | GNU C++14 | TESTS | 44 | 93 | 3379200 | 2400 | |
33896024 | zhouyuyang233 | F | Jan. 4, 2018, 4:26 a.m. | OK | GNU C++14 | TESTS | 44 | 93 | 4300800 | 2400 | |
33884329 | ShJ | F | Jan. 3, 2018, 12:17 p.m. | OK | GNU C++14 | TESTS | 44 | 93 | 4300800 | 2400 | |
33811944 | Farhod_Farmon | F | Dec. 30, 2017, 2:54 p.m. | OK | GNU C++14 | TESTS | 44 | 93 | 4608000 | 2400 | |
33834105 | Artistic_Fantasy | F | Dec. 31, 2017, 3:10 p.m. | OK | GNU C++14 | TESTS | 44 | 93 | 11366400 | 2400 | |
54472495 | CMXRYNP | F | May 22, 2019, 6:23 a.m. | OK | GNU C++17 | TESTS | 44 | 46 | 2457600 | 2400 | |
53660477 | asipu_pawan | F | May 2, 2019, 7:25 a.m. | OK | GNU C++17 | TESTS | 44 | 124 | 0 | 2400 | |
36085763 | vjudge5 | F | March 9, 2018, 3:08 a.m. | OK | GNU C++17 | TESTS | 44 | 124 | 1843200 | 2400 | |
44568869 | vjudge3 | F | Oct. 20, 2018, 3:18 a.m. | OK | GNU C++17 | TESTS | 44 | 124 | 2969600 | 2400 | |
44568845 | Sea_son | F | Oct. 20, 2018, 3:17 a.m. | OK | GNU C++17 | TESTS | 44 | 124 | 2969600 | 2400 | |
51967994 | zhaimingshuzms | F | March 29, 2019, 11:01 a.m. | OK | GNU C++17 | TESTS | 44 | 124 | 3891200 | 2400 | |
49639738 | Zenkai | F | Feb. 8, 2019, 8:49 p.m. | OK | GNU C++17 | TESTS | 44 | 124 | 5017600 | 2400 | |
69084208 | SGHD | F | Jan. 19, 2020, 7:40 a.m. | OK | GNU C++17 | TESTS | 44 | 124 | 6348800 | 2400 | |
60399011 | Phortox | F | Sept. 11, 2019, 3:58 p.m. | OK | GNU C++17 | TESTS | 44 | 124 | 6348800 | 2400 | |
53697640 | Shayan.P | F | May 3, 2019, 8:36 a.m. | OK | GNU C++17 | TESTS | 44 | 124 | 6348800 | 2400 | |
33788594 | Martynas | F | Dec. 29, 2017, 5:43 p.m. | OK | Go | TESTS | 44 | 93 | 34713600 | 2400 | |
33785106 | uwi | F | Dec. 29, 2017, 5:08 p.m. | OK | Java 8 | TESTS | 44 | 155 | 20684800 | 2400 | |
33975017 | JialinOuyang | F | Jan. 7, 2018, 2:06 a.m. | OK | Java 8 | TESTS | 44 | 170 | 20684800 | 2400 | |
37250332 | SrapZark | F | April 12, 2018, 1 p.m. | OK | Java 8 | TESTS | 44 | 171 | 20684800 | 2400 | |
33788470 | ilyakor | F | Dec. 29, 2017, 5:42 p.m. | OK | Java 8 | TESTS | 44 | 171 | 20684800 | 2400 | |
33860388 | tmwilliamlin168 | F | Jan. 2, 2018, 8:52 a.m. | OK | Java 8 | TESTS | 44 | 171 | 25292800 | 2400 | |
34909040 | antkhorin | F | Feb. 3, 2018, 9:14 p.m. | OK | Java 8 | TESTS | 44 | 171 | 26214400 | 2400 | |
35754763 | ArcadioN | F | Feb. 27, 2018, 7:52 a.m. | OK | Java 8 | TESTS | 44 | 233 | 20787200 | 2400 | |
33781975 | eatmore | F | Dec. 29, 2017, 4:42 p.m. | OK | Java 8 | TESTS | 44 | 249 | 20684800 | 2400 | |
35754832 | JRCruz | F | Feb. 27, 2018, 7:56 a.m. | OK | Java 8 | TESTS | 44 | 249 | 20787200 | 2400 | |
35728722 | JRCruz | F | Feb. 26, 2018, 10:55 a.m. | OK | Java 8 | TESTS | 44 | 249 | 20787200 | 2400 | |
33811073 | og.kostya | F | Dec. 30, 2017, 2:13 p.m. | OK | MS C# | TESTS | 44 | 109 | 18227200 | 2400 | |
33781160 | waltz | F | Dec. 29, 2017, 4:36 p.m. | OK | MS C++ | TESTS | 44 | 93 | 3584000 | 2400 | |
33791234 | Perforator | F | Dec. 29, 2017, 6:07 p.m. | OK | MS C++ | TESTS | 44 | 93 | 5734400 | 2400 | |
37455993 | vjudge2 | F | April 19, 2018, 8:48 a.m. | OK | MS C++ | TESTS | 44 | 108 | 3481600 | 2400 | |
33788038 | LoneFox | F | Dec. 29, 2017, 5:37 p.m. | OK | MS C++ | TESTS | 44 | 109 | 7168000 | 2400 | |
33784259 | lucyanna2018 | F | Dec. 29, 2017, 5 p.m. | OK | MS C++ | TESTS | 44 | 140 | 5324800 | 2400 | |
46535529 | vjudge1 | F | Dec. 3, 2018, 8:47 a.m. | OK | MS C++ | TESTS | 44 | 280 | 5324800 | 2400 | |
46535002 | ashanwindy | F | Dec. 3, 2018, 8:29 a.m. | OK | MS C++ | TESTS | 44 | 296 | 5324800 | 2400 | |
33789855 | MrMirotic | F | Dec. 29, 2017, 5:56 p.m. | OK | MS C++ | TESTS | 44 | 358 | 6860800 | 2400 | |
33814585 | Darooha | F | Dec. 30, 2017, 4:37 p.m. | OK | Ocaml | TESTS | 44 | 264 | 21196800 | 2400 | |
61800766 | pajenegod | F | Oct. 3, 2019, 6:53 p.m. | OK | PyPy 2 | TESTS | 44 | 358 | 45363200 | 2400 | |
33822997 | pajenegod | F | Dec. 31, 2017, 12:38 a.m. | OK | PyPy 2 | TESTS | 44 | 389 | 96051200 | 2400 | |
33816941 | L1va | F | Dec. 30, 2017, 5:54 p.m. | OK | PyPy 2 | TESTS | 44 | 452 | 32665600 | 2400 | |
39756576 | aeternalis1 | F | June 29, 2018, 2:52 a.m. | OK | PyPy 2 | TESTS | 44 | 748 | 25600000 | 2400 | |
33792716 | pajenegod | F | Dec. 29, 2017, 7:12 p.m. | OK | PyPy 2 | TESTS | 44 | 919 | 41472000 | 2400 | |
40110954 | Ali_Pi | F | July 9, 2018, 11:43 a.m. | OK | PyPy 2 | TESTS | 44 | 935 | 3686400 | 2400 | |
33823019 | pajenegod | F | Dec. 31, 2017, 12:41 a.m. | OK | PyPy 3 | TESTS | 44 | 842 | 83660800 | 2400 | |
33873321 | madn | F | Jan. 2, 2018, 8:28 p.m. | OK | PyPy 3 | TESTS | 44 | 1138 | 33996800 | 2400 | |
33873351 | madn | F | Jan. 2, 2018, 8:31 p.m. | OK | PyPy 3 | TESTS | 44 | 1153 | 33587200 | 2400 | |
40110975 | Ali_Pi | F | July 9, 2018, 11:43 a.m. | OK | Python 2 | TESTS | 44 | 1169 | 4915200 | 2400 | |
33920794 | yugle7 | F | Jan. 5, 2018, 11:38 a.m. | OK | Python 3 | TESTS | 44 | 1419 | 5632000 | 2400 | |
33829756 | Krishna | F | Dec. 31, 2017, 10:48 a.m. | OK | Python 3 | TESTS | 44 | 1419 | 14131200 | 2400 | |
33818614 | FlakeLCR | F | Dec. 30, 2017, 7:03 p.m. | OK | Python 3 | TESTS | 44 | 1450 | 13107200 | 2400 | |
33819025 | FlakeLCR | F | Dec. 30, 2017, 7:23 p.m. | OK | Python 3 | TESTS | 44 | 1482 | 5632000 | 2400 | |
33818922 | FlakeLCR | F | Dec. 30, 2017, 7:18 p.m. | OK | Python 3 | TESTS | 44 | 1496 | 5632000 | 2400 | |
33819081 | FlakeLCR | F | Dec. 30, 2017, 7:26 p.m. | OK | Python 3 | TESTS | 44 | 1528 | 5632000 | 2400 | |
33846490 | Ferume | F | Jan. 1, 2018, 12:10 p.m. | OK | Python 3 | TESTS | 44 | 1622 | 34508800 | 2400 | |
33906381 | soto_nlp | F | Jan. 4, 2018, 3:46 p.m. | OK | Python 3 | TESTS | 44 | 1716 | 13107200 | 2400 | |
33818564 | FlakeLCR | F | Dec. 30, 2017, 7:01 p.m. | OK | Python 3 | TESTS | 44 | 1824 | 5632000 | 2400 | |
33783429 | limed | F | Dec. 29, 2017, 4:53 p.m. | OK | Scala | TESTS | 44 | 873 | 39833600 | 2400 |
Back to search problems