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 141764063 July 23, 2020, 11:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1542 ) B1 Village (Minimum) PROGRAMMING *special greedy

B'This problem is split into two tasks. In this task, you are required to find the minimum possible answer. In the task Village (Maximum) you are required to find the maximum 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 smallest 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 smallest total length is 8 km (this can be achieved by moving 1 to 6 , 2 to 4 , 3 to 1 , 4 to 2 , 5 to 7 , 6 to 3 , 7 to 5 ). Write a program that finds the smallest 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 smallest total length of the shortest paths in kilometers. In the second line describe one valid assignment of the new houses with the smallest total length: N space-separated distinct integers v_1, v_2, ldots, v_N . For each i , '...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
87778746 QuartZ_Z B1 July 23, 2020, 1:46 p.m. OK GNU C++11 TESTS 82 46 10752000
91686290 luogu_bot5 B1 Sept. 3, 2020, 4:24 a.m. OK GNU C++11 TESTS 82 61 3584000
87843837 Frame233 B1 July 24, 2020, 8:44 a.m. OK GNU C++11 TESTS 82 61 11059200
87863445 minakami_yuki B1 July 24, 2020, 1:02 p.m. OK GNU C++11 TESTS 82 62 13004800
88585954 SCLchuck B1 July 31, 2020, 11:17 a.m. OK GNU C++11 TESTS 82 78 16179200
90517908 hs-black B1 Aug. 21, 2020, 9:08 a.m. OK GNU C++11 TESTS 82 92 28876800
91004379 duality B1 Aug. 25, 2020, 9:46 p.m. OK GNU C++11 TESTS 82 93 10854400
89227517 train_driver B1 Aug. 7, 2020, 2:57 p.m. OK GNU C++11 TESTS 82 93 13312000
87772016 Bruteforceman B1 July 23, 2020, 12:42 p.m. OK GNU C++11 TESTS 82 93 13312000
87775961 Nazrin B1 July 23, 2020, 1:20 p.m. OK GNU C++11 TESTS 82 93 17408000
87785969 11235813213455 B1 July 23, 2020, 2:53 p.m. OK GNU C++14 TESTS 82 77 13414400
90393149 NaimSS B1 Aug. 19, 2020, 1:41 p.m. OK GNU C++14 TESTS 82 92 7987200
90696156 Qu0cNguyen B1 Aug. 22, 2020, 2:41 p.m. OK GNU C++14 TESTS 82 93 11776000
90524171 mat_v B1 Aug. 21, 2020, 10:44 a.m. OK GNU C++14 TESTS 82 93 11776000
89580904 tbzard B1 Aug. 11, 2020, 1:31 p.m. OK GNU C++14 TESTS 82 93 11776000
88584362 manag B1 July 31, 2020, 10:57 a.m. OK GNU C++14 TESTS 82 93 11776000
88142661 Hung912 B1 July 27, 2020, 4:06 p.m. OK GNU C++14 TESTS 82 93 11776000
88165389 nandonathaniel B1 July 28, 2020, 2 a.m. OK GNU C++14 TESTS 82 93 13312000
87799105 rama_pang B1 July 23, 2020, 5:43 p.m. OK GNU C++14 TESTS 82 93 13721600
87773561 BlueDiamond B1 July 23, 2020, 12:57 p.m. OK GNU C++14 TESTS 82 93 15052800
87820009 liouzhou_101 B1 July 24, 2020, 2:23 a.m. OK GNU C++17 TESTS 82 62 13619200
90482681 AceKing B1 Aug. 20, 2020, 4:47 p.m. OK GNU C++17 TESTS 82 93 7884800
87809526 Rafi22 B1 July 23, 2020, 8:29 p.m. OK GNU C++17 TESTS 82 93 9011200
91655792 prvocislo B1 Sept. 2, 2020, 3:45 p.m. OK GNU C++17 TESTS 82 93 9523200
88785912 cx991011 B1 Aug. 3, 2020, 9:13 a.m. OK GNU C++17 TESTS 82 93 9728000
89321975 DANDROZAVR B1 Aug. 8, 2020, 9:14 a.m. OK GNU C++17 TESTS 82 93 10547200
91124135 SochuKing B1 Aug. 27, 2020, 10:27 a.m. OK GNU C++17 TESTS 82 93 10752000
88716839 valerikk B1 Aug. 2, 2020, 8:54 a.m. OK GNU C++17 TESTS 82 93 11776000
87767676 Farhod_Farmon B1 July 23, 2020, 11:58 a.m. OK GNU C++17 TESTS 82 93 11776000
87897329 _overrated_ B1 July 24, 2020, 3:26 p.m. OK GNU C++17 TESTS 82 93 11878400
88614395 ivan100sic B1 July 31, 2020, 5:54 p.m. OK GNU C++17 (64) TESTS 82 77 17203200
88414431 Purple_wzy B1 July 30, 2020, 7:47 a.m. OK GNU C++17 (64) TESTS 82 78 7987200
88685815 the_hyp0cr1t3 B1 Aug. 1, 2020, 5:57 p.m. OK GNU C++17 (64) TESTS 82 93 10547200
87776317 almogwald B1 July 23, 2020, 1:23 p.m. OK GNU C++17 (64) TESTS 82 93 11673600
91260161 TselmegKh B1 Aug. 29, 2020, 6:12 a.m. OK GNU C++17 (64) TESTS 82 93 13824000
88427083 airad B1 July 30, 2020, 10:13 a.m. OK GNU C++17 (64) TESTS 82 93 18022400
87787362 Noam13 B1 July 23, 2020, 3:24 p.m. OK GNU C++17 (64) TESTS 82 93 18022400
88650431 emthrm B1 Aug. 1, 2020, 9:17 a.m. OK GNU C++17 (64) TESTS 82 93 21094400
89383893 SorahISA B1 Aug. 9, 2020, 8:10 a.m. OK GNU C++17 (64) TESTS 82 93 21708800
88577568 AlexPop28 B1 July 31, 2020, 9:27 a.m. OK GNU C++17 (64) TESTS 82 93 22732800
91252124 skittles1412 B1 Aug. 29, 2020, 2:54 a.m. OK Java 11 TESTS 82 421 84275200
90867872 mphillotry B1 Aug. 25, 2020, 4:42 a.m. OK Java 11 TESTS 82 514 79872000
88927734 The_Hidden_Man B1 Aug. 5, 2020, 8:12 a.m. OK Java 8 TESTS 82 296 44032000
88923357 nidhigoel B1 Aug. 5, 2020, 7:01 a.m. OK Java 8 TESTS 82 296 44032000
88209750 alibaba B1 July 28, 2020, 1:55 p.m. OK Java 8 TESTS 82 389 71577600
87779375 jonas.havelka.42 B1 July 23, 2020, 1:53 p.m. OK Kotlin TESTS 82 576 97280000
87779836 pajenegod B1 July 23, 2020, 1:57 p.m. OK PyPy 2 TESTS 82 233 41676800
88127247 sh1194 B1 July 27, 2020, 12:48 p.m. OK PyPy 2 TESTS 82 234 41881600
88127372 sh1194 B1 July 27, 2020, 12:50 p.m. OK PyPy 2 TESTS 82 249 41676800

remove filters

Back to search problems