Mail.Ru Cup 2018 Round 1

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
1054 Mail.Ru Cup 2018 Round 1 FINISHED False 9000 197645123 Oct. 18, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 300 ) G New Road Network PROGRAMMING constructive algorithms greedy math 2900

B"The king of some country N decided to completely rebuild the road network. There are n people living in the country, they are enumerated from 1 to n . It is possible to construct a road between the house of any citizen a to the house of any other citizen b . There should not be more than one road between any pair of citizens. The road network must be connected, i.e. it should be possible to reach every citizen starting from anyone using roads. To save funds, it was decided to build exactly n-1 road, so the road network should be a tree. However, it is not that easy as it sounds, that's why the king addressed you for help. There are m secret communities in the country, each of them unites a non-empty subset of citizens. The king does not want to conflict with any of the communities, so he wants to build the network such that the houses of members of each society form a connected subtree in network. A set of vertices forms a connected subtree if and only if the graph remains connected when we delete all the other vertices and all edges but ones that connect the vertices from the set. Help the king to determine if it is possible to build the desired road network, and if it is, build it. Each test consists of one or more test cases. The first line contains a single integer t ( 1 <= q t <= q 2000 ) -- the number of test cases. The following lines describe the test cases, each in the following format. The first line contains two integers n and m ( 1 <= q n, m <= q 2000 ) -- the number of citizens and the number of secret communities. The next m lines contain the description of the communities. The i -th of these lines contains a string s_i of length n , consisting of characters '0' and '1'. The citizen with number j is a member of the i -th community if and only if s_{{i}{j}}=1 . It is guaranteed that the string s_i contains at least one charact"...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44517625 Um_nik G Oct. 18, 2018, 6:42 p.m. OK GNU C++11 TESTS 200 139 5120000 2900
46046850 zhouyuyang G Nov. 22, 2018, 3:14 a.m. OK GNU C++11 TESTS 200 218 1536000 2900
44681774 yasugongshang G Oct. 22, 2018, 6:56 a.m. OK GNU C++11 TESTS 200 218 1638400 2900
44681907 yasugongshang G Oct. 22, 2018, 7:01 a.m. OK GNU C++11 TESTS 200 233 1638400 2900
44681678 yasugongshang G Oct. 22, 2018, 6:52 a.m. OK GNU C++11 TESTS 200 234 1740800 2900
68450513 Doube_Suzerain G Jan. 9, 2020, 2:10 p.m. OK GNU C++11 TESTS 200 312 1126400 2900
59816887 hankeke G Aug. 31, 2019, 3:41 p.m. OK GNU C++11 TESTS 200 452 16793600 2900
46693056 code_struck G Dec. 6, 2018, 5:45 p.m. OK GNU C++11 TESTS 200 514 39219200 2900
44761423 YangDavid G Oct. 24, 2018, 7:23 a.m. OK GNU C++11 TESTS 200 514 49664000 2900
44623789 Phronesis G Oct. 21, 2018, 8 a.m. OK GNU C++11 TESTS 200 514 52633600 2900
45131175 gamegame G Oct. 31, 2018, 10:25 a.m. OK GNU C++14 TESTS 200 296 1126400 2900
44563015 Radewoosh G Oct. 19, 2018, 8:36 p.m. OK GNU C++14 TESTS 200 312 17817600 2900
48550574 black_horse2014 G Jan. 19, 2019, 1:26 a.m. OK GNU C++14 TESTS 200 327 716800 2900
44564826 Radewoosh G Oct. 19, 2018, 10:07 p.m. OK GNU C++14 TESTS 200 342 17817600 2900
44533747 Anadi G Oct. 19, 2018, 7:52 a.m. OK GNU C++14 TESTS 200 343 512000 2900
45277483 JioFell G Nov. 4, 2018, 11:54 a.m. OK GNU C++14 TESTS 200 420 33894400 2900
44536568 radoslav11 G Oct. 19, 2018, 9:12 a.m. OK GNU C++14 TESTS 200 467 39219200 2900
47673355 KwanghyunOn G Dec. 29, 2018, 7:33 a.m. OK GNU C++14 TESTS 200 592 34611200 2900
44561802 bgrm G Oct. 19, 2018, 7:59 p.m. OK GNU C++14 TESTS 200 655 49766400 2900
46133344 w446506278 G Nov. 24, 2018, 3:35 a.m. OK GNU C++14 TESTS 200 670 28876800 2900
44751487 ReaLNero1 G Oct. 23, 2018, 8:11 p.m. OK GNU C++17 TESTS 200 139 5427200 2900
44531481 265918 G Oct. 19, 2018, 6:44 a.m. OK GNU C++17 TESTS 200 139 5427200 2900
64164345 Mai-sanBestWaifu G Nov. 3, 2019, 3:42 p.m. OK GNU C++17 TESTS 200 155 5222400 2900
54665644 Xellos G May 26, 2019, 1:12 p.m. OK GNU C++17 TESTS 200 171 819200 2900
44566471 Benq G Oct. 20, 2018, 12:40 a.m. OK GNU C++17 TESTS 200 265 1945600 2900
45952652 kczno1 G Nov. 19, 2018, 7:23 a.m. OK GNU C++17 TESTS 200 405 8806400 2900
45952546 kczno1 G Nov. 19, 2018, 7:18 a.m. OK GNU C++17 TESTS 200 405 8806400 2900
44679263 LiChenKoh G Oct. 22, 2018, 4:55 a.m. OK GNU C++17 TESTS 200 405 27238400 2900
44522542 isaf27 G Oct. 18, 2018, 10:11 p.m. OK GNU C++17 TESTS 200 405 34304000 2900
44761242 YangDavid G Oct. 24, 2018, 7:17 a.m. OK GNU C++17 TESTS 200 529 49868800 2900
44531785 Lewin G Oct. 19, 2018, 6:52 a.m. OK Java 8 TESTS 200 1638 37683200 2900
44518849 Lewin G Oct. 18, 2018, 6:57 p.m. OK Java 8 TESTS 200 1700 38400000 2900

remove filters

Back to search problems