Baltic Olympiad in Informatics 2020, Day 2 (IOI, Unofficial Mirror Contest, Unrated)

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
1387 Baltic Olympiad in Informatics 2020, Day 2 (IOI, Unofficial Mirror Contest, Unrated) FINISHED False 19800 136320899 July 23, 2020, 11:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 922 ) B2 Village (Maximum) PROGRAMMING *special

B'This problem is split into two tasks. In this task, you are required to find the maximum possible answer. In the task Village (Minimum) you are required to find the minimum possible answer. Each task is worth 50 points. There are N houses in a certain village. A single villager lives in each of the houses. The houses are connected by roads. Each road connects two houses and is exactly 1 kilometer long. From each house it is possible to reach any other using one or several consecutive roads. In total there are N-1 roads in the village. One day all villagers decided to move to different houses -- that is, after moving each house should again have a single villager living in it, but no villager should be living in the same house as before. We would like to know the largest possible total length in kilometers of the shortest paths between the old and the new houses for all villagers. Example village with seven houses For example, if there are seven houses connected by roads as shown on the figure, the largest total length is 18 km (this can be achieved by moving 1 to 7 , 2 to 3 , 3 to 4 , 4 to 1 , 5 to 2 , 6 to 5 , 7 to 6 ). Write a program that finds the largest total length of the shortest paths in kilometers and an example assignment of the new houses to the villagers. The first line contains an integer N ( 1 < N <= 10^5 ). Houses are numbered by consecutive integers 1, 2, ldots, N . Then N-1 lines follow that describe the roads. Each line contains two integers a and b ( 1 <= a, b <= N , a neq b ) denoting that there is a road connecting houses a and b . In the first line output the largest total length of the shortest paths in kilometers. In the second line describe one valid assignment of the new houses with the largest total length: N space-separated distinct integers v_1, v_2, ldots, v_N . For each i , v'...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
88041162 zjczzzjczjczzzjc B2 July 26, 2020, 8:50 a.m. OK GNU C++11 TESTS 82 31 11776000
89170705 dysyn1314 B2 Aug. 7, 2020, 3:53 a.m. OK GNU C++11 TESTS 82 46 14643200
90519147 hs-black B2 Aug. 21, 2020, 9:26 a.m. OK GNU C++11 TESTS 82 46 26521600
87772537 QuartZ_Z B2 July 23, 2020, 12:47 p.m. OK GNU C++11 TESTS 82 61 10752000
89169462 dysyn1314 B2 Aug. 7, 2020, 3:24 a.m. OK GNU C++11 TESTS 82 61 16281600
87842364 Frame233 B2 July 24, 2020, 8:26 a.m. OK GNU C++11 TESTS 82 62 13209600
87783659 Nazrin B2 July 23, 2020, 2:32 p.m. OK GNU C++11 TESTS 82 78 17305600
88025755 minakami_yuki B2 July 26, 2020, 3:50 a.m. OK GNU C++11 TESTS 82 78 18124800
87843012 wasa855 B2 July 24, 2020, 8:34 a.m. OK GNU C++11 TESTS 82 78 21913600
87764188 emoairx B2 July 23, 2020, 11:19 a.m. OK GNU C++11 TESTS 82 78 31232000
87851620 11235813213455 B2 July 24, 2020, 10:32 a.m. OK GNU C++14 TESTS 82 62 12697600
88144022 Hung912 B2 July 27, 2020, 4:26 p.m. OK GNU C++14 TESTS 82 93 12902400
87816498 SuperJ6 B2 July 24, 2020, 12:31 a.m. OK GNU C++14 TESTS 82 93 12902400
91246620 Aaeria B2 Aug. 28, 2020, 10:26 p.m. OK GNU C++14 TESTS 82 108 11980800
89537171 rumen_m B2 Aug. 10, 2020, 9:45 p.m. OK GNU C++14 TESTS 82 108 14028800
88763947 krijgertje B2 Aug. 2, 2020, 11:54 p.m. OK GNU C++14 TESTS 82 109 12492800
87770865 tmwilliamlin168 B2 July 23, 2020, 12:30 p.m. OK GNU C++14 TESTS 82 109 12492800
89137548 Maripium B2 Aug. 6, 2020, 3:32 p.m. OK GNU C++14 TESTS 82 109 13209600
87777949 Gioto B2 July 23, 2020, 1:39 p.m. OK GNU C++14 TESTS 82 109 14540800
87776492 sava-cska B2 July 23, 2020, 1:25 p.m. OK GNU C++14 TESTS 82 109 14745600
87822269 liouzhou_101 B2 July 24, 2020, 3:17 a.m. OK GNU C++17 TESTS 82 77 19968000
88628046 Einstein314 B2 Aug. 1, 2020, 1:46 a.m. OK GNU C++17 TESTS 82 93 9728000
88872793 matumbaman B2 Aug. 4, 2020, 1:08 p.m. OK GNU C++17 TESTS 82 93 12288000
88829062 luciocf B2 Aug. 3, 2020, 9:07 p.m. OK GNU C++17 TESTS 82 93 12902400
89357299 aurinegro B2 Aug. 8, 2020, 6:36 p.m. OK GNU C++17 TESTS 82 93 13209600
87813568 Bench0310 B2 July 23, 2020, 10:21 p.m. OK GNU C++17 TESTS 82 93 14336000
88633574 vioalbert B2 Aug. 1, 2020, 4:37 a.m. OK GNU C++17 TESTS 82 93 14438400
87792662 spectrra B2 July 23, 2020, 4:20 p.m. OK GNU C++17 TESTS 82 93 14438400
87816555 tabr B2 July 24, 2020, 12:34 a.m. OK GNU C++17 TESTS 82 93 17305600
89929948 JovanB B2 Aug. 14, 2020, 3:38 p.m. OK GNU C++17 TESTS 82 108 9625600
87808744 .__. B2 July 23, 2020, 8:13 p.m. OK GNU C++17 (64) TESTS 82 78 20684800
88615218 ivan100sic B2 July 31, 2020, 6:09 p.m. OK GNU C++17 (64) TESTS 82 78 21504000
88415590 Purple_wzy B2 July 30, 2020, 8 a.m. OK GNU C++17 (64) TESTS 82 93 18841600
87784040 tfg B2 July 23, 2020, 2:36 p.m. OK GNU C++17 (64) TESTS 82 93 19456000
87777891 emthrm B2 July 23, 2020, 1:38 p.m. OK GNU C++17 (64) TESTS 82 93 22323200
88114260 MarcoMeijer B2 July 27, 2020, 9:41 a.m. OK GNU C++17 (64) TESTS 82 93 32358400
88196785 N_o_o_B B2 July 28, 2020, 11:01 a.m. OK GNU C++17 (64) TESTS 82 108 17510400
88584540 AlexPop28 B2 July 31, 2020, 11 a.m. OK GNU C++17 (64) TESTS 82 108 22016000
87788083 Arpa B2 July 23, 2020, 3:33 p.m. OK GNU C++17 (64) TESTS 82 109 19660800
87769812 jiangly B2 July 23, 2020, 12:20 p.m. OK GNU C++17 (64) TESTS 82 109 20684800
87790543 jonas.havelka.42 B2 July 23, 2020, 3:57 p.m. OK Kotlin TESTS 82 686 91443200
88127527 sh1194 B2 July 27, 2020, 12:51 p.m. OK PyPy 2 TESTS 82 296 45158400
88127866 sh1194 B2 July 27, 2020, 12:56 p.m. OK PyPy 2 TESTS 82 342 45568000
87787100 pajenegod B2 July 23, 2020, 3:19 p.m. OK PyPy 2 TESTS 82 343 45056000
88127709 sh1194 B2 July 27, 2020, 12:54 p.m. OK PyPy 2 TESTS 82 358 44748800
87787016 pajenegod B2 July 23, 2020, 3:17 p.m. OK PyPy 2 TESTS 82 374 45056000

remove filters

Back to search problems