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 |
---|---|---|---|---|---|---|
1662 | SWERC 2021-2022 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 86468063 | April 24, 2022, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 485 ) | G | Gastronomic Event | PROGRAMMING | trees |
B'SWERC organizers want to hold a gastronomic event. The location of the event is a building with n rooms connected by n-1 corridors (each corridor connects two rooms) so that it is possible to go from any room to any other room. In each room you have to set up the tasting of a typical Italian dish. You can choose from n typical Italian dishes rated from 1 to n depending on how good they are ( n is the best possible rating). The n dishes have distinct ratings. You want to assign the n dishes to the n rooms so that the number of pleasing tours is maximal. A pleasing tour is a nonempty sequence of rooms so that: The first line contains an integer n ( 2 <= n <= 1 ,000 ,000 ) -- the number of rooms. The second line contains n-1 integers p_2, p_3, cdots , p_n ( 1 <= q p_i < i ). Each p_i indicates that there is a corridor between room i and room p_i . It is guaranteed that the building has the property that it is possible to go from any room to any other room. Print the maximum number of pleasing tours. In the first sample, it is optimal to place the dish with rating 1 in room 1 , the dish with rating 2 in room 3 , the dish with rating 3 in room 2 , the dish with rating 4 in room 5 and the dish with rating 5 in room 4 . All the 13 possible pleasing tours are: (1) , (2) , (3) , (4) , (5) , (1,2) , (3,2) , (2,4) , (2,5) , (1,2,4) , (1,2,5) , (3,2,4) , (3,2,5) . There are also other ways to assign the dishes to the rooms so that there are 13 pleasing tours. '... |
102042 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
154892820 | _LeMur_ | G | April 24, 2022, 9:56 p.m. | OK | GNU C++17 | TESTS | 52 | 468 | 39731200 | ||
154860404 | hieplpvip ta4p _SS | G | April 24, 2022, 2:07 p.m. | OK | GNU C++17 | TESTS | 52 | 483 | 43929600 | ||
154859003 | humbertoyusta sanchezIII MDario | G | April 24, 2022, 1:53 p.m. | OK | GNU C++17 | TESTS | 52 | 483 | 59289600 | ||
154852254 | gisp_zjz Roundgod | G | April 24, 2022, 12:48 p.m. | OK | GNU C++17 | TESTS | 52 | 529 | 43724800 | ||
154894916 | paula | G | April 24, 2022, 10:55 p.m. | OK | GNU C++17 | TESTS | 52 | 607 | 73216000 | ||
154854401 | Merkurev KAN Um_nik | G | April 24, 2022, 1:08 p.m. | OK | GNU C++17 | TESTS | 52 | 1107 | 53964800 | ||
154861516 | hank55663 | G | April 24, 2022, 2:18 p.m. | OK | GNU C++17 | TESTS | 52 | 1153 | 56115200 | ||
154867032 | ugly2333 | G | April 24, 2022, 3:19 p.m. | OK | GNU C++17 | TESTS | 52 | 1903 | 64204800 | ||
154858338 | mango_lassi please_delete_account YaoBIG | G | April 24, 2022, 1:47 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 404 | 64716800 | ||
154893488 | Egor.Lifar cookiedoth rqi | G | April 24, 2022, 10:11 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 468 | 111411200 | ||
154864583 | weak_kid sevlll777 Dart-Xeyter | G | April 24, 2022, 2:52 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 483 | 60006400 | ||
154852822 | gs18115 Retro3014 Gom | G | April 24, 2022, 12:53 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 499 | 92672000 | ||
154904991 | MarcosK | G | April 25, 2022, 5:06 a.m. | OK | GNU C++17 (64) | TESTS | 52 | 545 | 76697600 | ||
154861044 | zhangguangxuan99 nvmdava Maripium | G | April 24, 2022, 2:13 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 607 | 316211200 | ||
154859536 | Siberian _tryhard alexxela12345 | G | April 24, 2022, 1:58 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 670 | 63590400 | ||
154852189 | errorgorn Pyqe rama_pang | G | April 24, 2022, 12:47 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 826 | 80179200 | ||
154870034 | SevenDusks | G | April 24, 2022, 3:48 p.m. | OK | GNU C++17 (64) | TESTS | 52 | 1403 | 77516800 | ||
154899667 | Neal_lee | G | April 25, 2022, 3:09 a.m. | OK | GNU C++20 (64) | TESTS | 52 | 311 | 44646400 | ||
154863447 | kostia244 KostasKostil VladProg | G | April 24, 2022, 2:40 p.m. | OK | GNU C++20 (64) | TESTS | 52 | 326 | 56729600 | ||
154899719 | Neal_lee | G | April 25, 2022, 3:11 a.m. | OK | GNU C++20 (64) | TESTS | 52 | 327 | 44646400 | ||
154851179 | khuepr123 thenymphsofdelphi HollwoQ_Pelw | G | April 24, 2022, 12:37 p.m. | OK | GNU C++20 (64) | TESTS | 52 | 327 | 67891200 | ||
154844659 | AriaH Koosha_Mv | G | April 24, 2022, 11:40 a.m. | OK | GNU C++20 (64) | TESTS | 52 | 342 | 52838400 | ||
154851825 | Davoth AmShZ Keshi | G | April 24, 2022, 12:43 p.m. | OK | GNU C++20 (64) | TESTS | 52 | 343 | 60825600 | ||
154869818 | hloya_ygrt Mediocrity PuRpLe_FoReVeR | G | April 24, 2022, 3:47 p.m. | OK | GNU C++20 (64) | TESTS | 52 | 343 | 62668800 | ||
154871920 | Heltion | G | April 24, 2022, 4:04 p.m. | OK | GNU C++20 (64) | TESTS | 52 | 358 | 76697600 | ||
154856165 | Endagorion | G | April 24, 2022, 1:26 p.m. | OK | GNU C++20 (64) | TESTS | 52 | 389 | 57753600 | ||
154850900 | TeaTime Ormlis Pechalka | G | April 24, 2022, 12:34 p.m. | OK | GNU C++20 (64) | TESTS | 52 | 389 | 63180800 |
Back to search problems