Helvetic Coding Contest 2016 online mirror (teams, 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
690 Helvetic Coding Contest 2016 online mirror (teams, unrated) FINISHED False 16200 308268023 July 10, 2016, 8 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 91 ) F2 Tree of Life (medium) PROGRAMMING constructive algorithms hashing trees 3000

Heidi got tired of deciphering the prophecy hidden in the Tree of Life and decided to go back to her headquarters, rest a little and try there. Of course, she cannot uproot the Tree and take it with her, so she made a drawing of the Tree on a piece of paper. On second thought, she made more identical drawings so as to have n in total (where n is the number of vertices of the Tree of Life) – who knows what might happen? Indeed, on her way back Heidi was ambushed by a group of zombies. While she managed to fend them off, they have damaged her drawings in a peculiar way: from the i -th copy, the vertex numbered i was removed, along with all adjacent edges. In each picture, the zombies have also erased all the vertex numbers and relabeled the remaining n - 1 vertices arbitrarily using numbers 1 to n (fortunately, each vertex still has a distinct number). What's more, the drawings have been arbitrarily shuffled/reordered. Now Heidi wants to recover the Tree of Life from her descriptions of all the drawings (as lists of edges). The first line of the input contains Z ≤ 20 – the number of test cases. Z descriptions of single test cases follow. In each test case, the first line of input contains numbers n ( 2 ≤ n ≤ 100 ) and k (where k is the number of drawings; we have k = n ). In the following lines, the descriptions of the k drawings are given. The description of the i -th drawing is a line containing m i – the number of edges in this drawing, followed by m i lines describing edges, each of which contains two space-separated integers –- the numbers of the two vertices connected by the edge. If Heidi's drawings cannot possibly come from a single tree, you should output the word NO . Otherwise, output one line containing the word YES and n - 1 lines describing any tree that Heidi's drawings could have come from. For every edge you should output the numbers of the vertices that it connects, separated with a single space. If there are many solutions, print any of th

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
21509452 returnzoo F2 Oct. 17, 2016, 1:43 a.m. OK GNU C++ TESTS 3 93 2560000 3000
25556073 DieIng F2 March 16, 2017, 5:11 p.m. OK GNU C++ TESTS 3 124 2764800 3000
27414588 sohelpust F2 May 28, 2017, 2:13 p.m. OK GNU C++ TESTS 3 467 1843200 3000
19011445 phamvanhanhgoldIOI2015 F2 July 10, 2016, 2:25 p.m. OK GNU C++ TESTS 3 2058 512000 3000
26055913 jiyutian F2 April 1, 2017, 2:09 p.m. OK GNU C++ TESTS 3 2605 3686400 3000
44111689 sonako F2 Oct. 11, 2018, 12:09 p.m. OK GNU C++11 TESTS 3 124 819200 3000
19006964 gustav ikatanic F2 July 10, 2016, 11:20 a.m. OK GNU C++11 TESTS 3 420 716800 3000
19403915 devilplus F2 July 25, 2016, 12:58 p.m. OK GNU C++11 TESTS 3 421 716800 3000
57880106 lopare F2 July 28, 2019, 7:23 a.m. OK GNU C++11 TESTS 3 436 1843200 3000
20397615 20140355 F2 Sept. 5, 2016, 10:41 a.m. OK GNU C++11 TESTS 3 514 1843200 3000
22505035 codemasterisme F2 Nov. 26, 2016, 9:23 a.m. OK GNU C++11 TESTS 3 561 1843200 3000
21133708 coco0115401 F2 Oct. 3, 2016, 10:20 a.m. OK GNU C++11 TESTS 3 624 1843200 3000
19010468 JoeyWheeler F2 July 10, 2016, 1:20 p.m. OK GNU C++11 TESTS 3 654 6451200 3000
19009261 SeyedParsa DarthKnight F2 July 10, 2016, 12:24 p.m. OK GNU C++11 TESTS 3 702 819200 3000
21133676 coco0115401 F2 Oct. 3, 2016, 10:19 a.m. OK GNU C++11 TESTS 3 841 1843200 3000
40984128 ReaLNero1 F2 July 30, 2018, 7:12 p.m. OK GNU C++14 TESTS 3 93 307200 3000
29507981 JSZKC F2 Aug. 16, 2017, 2:39 p.m. OK GNU C++14 TESTS 3 93 307200 3000
38547174 Al3ks1002 F2 May 22, 2018, 9:53 p.m. OK GNU C++14 TESTS 3 420 614400 3000
38545931 vjudge3 F2 May 22, 2018, 8:16 p.m. OK GNU C++14 TESTS 3 420 614400 3000
23690980 rng_57 F2 Jan. 11, 2017, 4:17 a.m. OK GNU C++14 TESTS 3 514 3891200 3000
23380150 Ali.Pi F2 Dec. 28, 2016, 2:41 p.m. OK GNU C++14 TESTS 3 530 3891200 3000
46956864 pranjal.ssh F2 Dec. 13, 2018, 5:03 a.m. OK GNU C++14 TESTS 3 997 614400 3000
46956991 pranjal.ssh F2 Dec. 13, 2018, 5:10 a.m. OK GNU C++14 TESTS 3 1684 1433600 3000
29550008 tossy F2 Aug. 18, 2017, 10:07 a.m. OK GNU C++14 TESTS 3 1700 1638400 3000
29551314 tossy F2 Aug. 18, 2017, 10:26 a.m. OK GNU C++14 TESTS 3 1716 1638400 3000

remove filters

Back to search problems