Avito Code Challenge 2018

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
981 Avito Code Challenge 2018 FINISHED False 10800 210093023 May 27, 2018, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5608 ) C Useful Decomposition PROGRAMMING implementation trees 1400

B'Ramesses knows a lot about problems involving trees (undirected connected graphs without cycles)! He created a new useful tree decomposition, but he does not know how to construct it, so he asked you for help! The decomposition is the splitting the edges of the tree in some simple paths in such a way that each two paths have at least one common vertex. Each edge of the tree should be in exactly one path. Help Remesses, find such a decomposition of the tree or derermine that there is no such decomposition. The first line contains a single integer n ( 2 <= q n <= q 10^{5} ) the number of nodes in the tree. Each of the next n xe2 x80 x89- xe2 x80 x891 lines contains two integers a_i and b_i ( 1 <= q a_i, b_i <= q n , a_i neq b_i ) -- the edges of the tree. It is guaranteed that the given edges form a tree. If there are no decompositions, print the only line containing "No". Otherwise in the first line print "Yes", and in the second line print the number of paths in the decomposition m . Each of the next m lines should contain two integers u_i , v_i ( 1 <= q u_i, v_i <= q n , u_i neq v_i ) denoting that one of the paths in the decomposition is the simple path between nodes u_i and v_i . Each pair of paths in the decomposition should have at least one common vertex, and each edge of the tree should be presented in exactly one path. You can print the paths and the ends of each path in arbitrary order. If there are multiple decompositions, print any. The tree from the first example is shown on the picture below: The number next to each edge corresponds to the path number in the decomposition. It is easy to see that this decomposition suits the required conditions. The tree from the second example is shown on the picture below: We can show that there are no valid decompositions of this tree. The tree from the third example is shown on the picture below: The number next to each edge corresponds t'...

Tutorials

Avito Code Challenge 2018 — разбор

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
38661162 yosupo C May 27, 2018, 3:05 p.m. OK D TESTS 47 109 18227200 1400
38662260 Gassa C May 27, 2018, 3:10 p.m. OK D TESTS 47 140 11776000 1400
38706419 rr_ C May 29, 2018, 12:26 a.m. OK D TESTS 47 156 11878400 1400
38662861 fluffyowl C May 27, 2018, 3:13 p.m. OK D TESTS 47 171 11878400 1400
38669833 ruban C May 27, 2018, 4:13 p.m. OK Delphi TESTS 47 77 227020800 1400
38666431 PAG C May 27, 2018, 3:38 p.m. OK FPC TESTS 47 187 409600 1400
38678740 LeoPro C May 27, 2018, 7:47 p.m. OK FPC TESTS 47 187 13721600 1400
38668197 AHTOH._. C May 27, 2018, 3:55 p.m. OK FPC TESTS 47 202 6041600 1400
38692650 Megamanvui C May 28, 2018, 11:36 a.m. OK FPC TESTS 47 202 15257600 1400
38669377 LeoPro C May 27, 2018, 4:08 p.m. OK FPC TESTS 47 249 13721600 1400
47681985 Khanh_Moriaty C Dec. 29, 2018, 12:37 p.m. OK FPC TESTS 47 311 4505600 1400
38669408 forlfs C May 27, 2018, 4:08 p.m. OK GNU C TESTS 47 77 409600 1400
38666706 sitara_lives C May 27, 2018, 3:40 p.m. OK GNU C TESTS 47 78 409600 1400
38794422 rubeennsp C May 31, 2018, 8:12 a.m. OK GNU C TESTS 47 78 3788800 1400
40096902 luogu_bot4 C July 9, 2018, 12:21 a.m. OK GNU C++ TESTS 47 31 409600 1400
40932153 ReaLNero1 C July 30, 2018, 1:37 a.m. OK GNU C++ TESTS 47 31 1433600 1400
38661628 AAWisong C May 27, 2018, 3:07 p.m. OK GNU C++ TESTS 47 31 1433600 1400
38664487 Icyfox C May 27, 2018, 3:22 p.m. OK GNU C++ TESTS 47 46 512000 1400
38684788 YjmStr C May 28, 2018, 5:06 a.m. OK GNU C++ TESTS 47 46 819200 1400
38662462 qkoqhh C May 27, 2018, 3:11 p.m. OK GNU C++ TESTS 47 46 2457600 1400
40028739 luogu_bot1 C July 6, 2018, 11:43 a.m. OK GNU C++ TESTS 47 46 4096000 1400
38681982 luogu_bot4 C May 28, 2018, 12:47 a.m. OK GNU C++ TESTS 47 46 4710400 1400
40724183 asdf1229 C July 25, 2018, 3:35 a.m. OK GNU C++ TESTS 47 46 5427200 1400
40724152 asdf1229 C July 25, 2018, 3:33 a.m. OK GNU C++ TESTS 47 46 5427200 1400
48522724 kyle201817146 C Jan. 18, 2019, 7:21 a.m. OK GNU C11 TESTS 47 342 819200 1400
38693019 rockstarcoder C May 28, 2018, 11:51 a.m. OK GNU C11 TESTS 47 451 409600 1400
38682942 alex.valukov C May 28, 2018, 2:35 a.m. OK GNU C11 TESTS 47 451 1228800 1400
38683420 tqltqltqltql C May 28, 2018, 3:14 a.m. OK GNU C++11 TESTS 47 46 204800 1400
38660711 yasugongshang C May 27, 2018, 3:03 p.m. OK GNU C++11 TESTS 47 46 409600 1400
38662559 ohweonfire C May 27, 2018, 3:11 p.m. OK GNU C++11 TESTS 47 46 409600 1400
38671237 1247 C May 27, 2018, 4:30 p.m. OK GNU C++11 TESTS 47 46 819200 1400
38661393 Mstdream C May 27, 2018, 3:06 p.m. OK GNU C++11 TESTS 47 46 1433600 1400
39020846 _FariD_ C June 7, 2018, 12:23 p.m. OK GNU C++11 TESTS 47 46 1433600 1400
38667558 lokiii C May 27, 2018, 3:49 p.m. OK GNU C++11 TESTS 47 46 1638400 1400
57314884 luogu_bot3 C July 19, 2019, 7:52 a.m. OK GNU C++11 TESTS 47 46 1638400 1400
38663190 ILLENIUM C May 27, 2018, 3:14 p.m. OK GNU C++11 TESTS 47 46 1843200 1400
38688308 luogu_bot2 C May 28, 2018, 8:24 a.m. OK GNU C++11 TESTS 47 46 1843200 1400
57260677 vjudge4 C July 18, 2019, 4:58 a.m. OK GNU C++14 TESTS 47 62 409600 1400
38662431 zbww C May 27, 2018, 3:10 p.m. OK GNU C++14 TESTS 47 62 409600 1400
38683424 AsuraCN C May 28, 2018, 3:14 a.m. OK GNU C++14 TESTS 47 62 409600 1400
46704102 daniel071292 C Dec. 7, 2018, 5:44 a.m. OK GNU C++14 TESTS 47 62 819200 1400
38661541 UESTC_Sphinx C May 27, 2018, 3:06 p.m. OK GNU C++14 TESTS 47 62 1433600 1400
41656166 hyzcf C Aug. 16, 2018, 2:45 p.m. OK GNU C++14 TESTS 47 62 1638400 1400
41123920 vjudge2 C Aug. 2, 2018, 1:18 p.m. OK GNU C++14 TESTS 47 62 1638400 1400
52144226 biliwang C April 1, 2019, 8:30 a.m. OK GNU C++14 TESTS 47 62 1638400 1400
38659889 ch_egor C May 27, 2018, 3 p.m. OK GNU C++14 TESTS 47 62 2048000 1400
45272632 incognito_ C Nov. 4, 2018, 9:15 a.m. OK GNU C++14 TESTS 47 62 2048000 1400
57260315 vjudge4 C July 18, 2019, 4:46 a.m. OK GNU C++17 TESTS 47 62 409600 1400
57260800 vjudge4 C July 18, 2019, 5:02 a.m. OK GNU C++17 TESTS 47 62 409600 1400
61684086 ltin C Oct. 2, 2019, 2:56 a.m. OK GNU C++17 TESTS 47 62 819200 1400
57264448 vjudge4 C July 18, 2019, 6:37 a.m. OK GNU C++17 TESTS 47 62 819200 1400
64293795 xuzhi1234 C Nov. 5, 2019, 7:58 a.m. OK GNU C++17 TESTS 47 62 1536000 1400
59894578 vjudge1 C Sept. 2, 2019, 11:40 a.m. OK GNU C++17 TESTS 47 62 3993600 1400
51416150 vjudge3 C March 17, 2019, 2:07 p.m. OK GNU C++17 TESTS 47 62 6144000 1400
38673371 almond C May 27, 2018, 5:01 p.m. OK GNU C++17 TESTS 47 77 409600 1400
57262419 vjudge3 C July 18, 2019, 5:51 a.m. OK GNU C++17 TESTS 47 77 409600 1400
39210675 bunny130 C June 13, 2018, 8:47 a.m. OK GNU C++17 TESTS 47 77 819200 1400
38663975 Martynas C May 27, 2018, 3:19 p.m. OK Go TESTS 47 93 5632000 1400
38685489 brainddump C May 28, 2018, 5:51 a.m. OK Haskell TESTS 47 124 23552000 1400
38680104 AQT C May 27, 2018, 9:07 p.m. OK Java 8 TESTS 47 140 0 1400
38692763 Owwee C May 28, 2018, 11:41 a.m. OK Java 8 TESTS 47 155 0 1400
38780720 Sharon C May 30, 2018, 5:15 p.m. OK Java 8 TESTS 47 155 20582400 1400
38879707 apurvaj C June 2, 2018, 8:35 a.m. OK Java 8 TESTS 47 156 20889600 1400
38699839 hulk_man C May 28, 2018, 4:43 p.m. OK Java 8 TESTS 47 171 0 1400
38694726 In_The_Name_Of_Love C May 28, 2018, 12:57 p.m. OK Java 8 TESTS 47 171 0 1400
38660169 mmaxio C May 27, 2018, 3:01 p.m. OK Java 8 TESTS 47 186 0 1400
38658945 qwerty787788 C May 27, 2018, 2:57 p.m. OK Java 8 TESTS 47 186 0 1400
38662147 StayAwayFromBitches C May 27, 2018, 3:09 p.m. OK Java 8 TESTS 47 186 9113600 1400
38692727 kocko C May 28, 2018, 11:40 a.m. OK Java 8 TESTS 47 187 0 1400
38671572 ldt116 C May 27, 2018, 4:34 p.m. OK Kotlin TESTS 47 218 0 1400
38660731 .o. C May 27, 2018, 3:03 p.m. OK Kotlin TESTS 47 592 25395200 1400
60309169 Glebik8 C Sept. 9, 2019, 3:05 p.m. OK Kotlin TESTS 47 670 14540800 1400
38682285 Lancern C May 28, 2018, 1:20 a.m. OK Kotlin TESTS 47 685 0 1400
38668827 0442A403 C May 27, 2018, 4:01 p.m. OK Kotlin TESTS 47 810 25600000 1400
56541072 og.kostya C July 5, 2019, 5:14 a.m. OK Mono C# TESTS 47 93 14848000 1400
38666426 renadeen C May 27, 2018, 3:38 p.m. OK Mono C# TESTS 47 249 30003200 1400
38716342 fr0st C May 29, 2018, 10:54 a.m. OK Mono C# TESTS 47 249 57651200 1400
38668285 GustavK C May 27, 2018, 3:56 p.m. OK Mono C# TESTS 47 280 4403200 1400
38664366 schoenus C May 27, 2018, 3:22 p.m. OK Mono C# TESTS 47 483 87756800 1400
59893419 vjudge3 C Sept. 2, 2019, 11:16 a.m. OK MS C++ TESTS 47 61 819200 1400
64182088 vjudge5 C Nov. 4, 2019, 1:49 a.m. OK MS C++ TESTS 47 61 1740800 1400
57266899 vjudge3 C July 18, 2019, 7:29 a.m. OK MS C++ TESTS 47 62 512000 1400
64341501 vjudge3 C Nov. 6, 2019, 3:06 a.m. OK MS C++ TESTS 47 62 819200 1400
64267789 vjudge2 C Nov. 4, 2019, 5:55 p.m. OK MS C++ TESTS 47 62 819200 1400
61690316 vjudge4 C Oct. 2, 2019, 5:28 a.m. OK MS C++ TESTS 47 62 819200 1400
57262238 vjudge5 C July 18, 2019, 5:46 a.m. OK MS C++ TESTS 47 62 819200 1400
64293922 vjudge4 C Nov. 5, 2019, 8:01 a.m. OK MS C++ TESTS 47 62 1228800 1400
38713596 2016214389 C May 29, 2018, 8:51 a.m. OK MS C++ TESTS 47 77 819200 1400
48533814 vjudge2 C Jan. 18, 2019, 1:18 p.m. OK MS C++ TESTS 47 77 819200 1400
61898712 AleksanderBalobanov C Oct. 5, 2019, 8 a.m. OK MS C++ 2017 TESTS 47 93 7782400 1400
57260977 vjudge4 C July 18, 2019, 5:07 a.m. OK MS C++ 2017 TESTS 47 109 3379200 1400
61717091 vjudge1 C Oct. 2, 2019, 12:51 p.m. OK MS C++ 2017 TESTS 47 499 819200 1400
61683808 vjudge2 C Oct. 2, 2019, 2:48 a.m. OK MS C++ 2017 TESTS 47 530 819200 1400
51397379 Pisces0311 C March 17, 2019, 5:25 a.m. OK MS C++ 2017 TESTS 47 561 6041600 1400
39087209 mayakin C June 10, 2018, 8:34 a.m. OK PHP TESTS 47 421 16793600 1400
38863835 YESMAths C June 1, 2018, 6:17 p.m. OK PyPy 2 TESTS 47 327 45670400 1400
38666885 algmyr C May 27, 2018, 3:42 p.m. OK PyPy 2 TESTS 47 420 26624000 1400
38665793 exoji2e C May 27, 2018, 3:33 p.m. OK PyPy 2 TESTS 47 546 18227200 1400
38703825 KeyurJain C May 28, 2018, 8:17 p.m. OK PyPy 3 TESTS 47 421 11059200 1400
38676448 dimi_dot_com C May 27, 2018, 5:45 p.m. OK PyPy 3 TESTS 47 592 25190400 1400
59930404 satyamcse C Sept. 3, 2019, 6:53 a.m. OK PyPy 3 TESTS 47 717 20992000 1400
38666042 pavlekn C May 27, 2018, 3:35 p.m. OK PyPy 3 TESTS 47 919 8806400 1400
38665702 Candyman C May 27, 2018, 3:32 p.m. OK PyPy 3 TESTS 47 936 9420800 1400
38661992 nwi C May 27, 2018, 3:08 p.m. OK Python 2 TESTS 47 280 11059200 1400
38667641 MathisHammel C May 27, 2018, 3:49 p.m. OK Python 2 TESTS 47 452 4915200 1400
50137592 introibo C Feb. 18, 2019, 7:38 p.m. OK Python 2 TESTS 47 498 7782400 1400
38692755 pa.n.ik C May 28, 2018, 11:41 a.m. OK Python 2 TESTS 47 514 13312000 1400
50137325 introibo C Feb. 18, 2019, 7:30 p.m. OK Python 2 TESTS 47 545 15360000 1400
50137277 introibo C Feb. 18, 2019, 7:29 p.m. OK Python 2 TESTS 47 546 23142400 1400
38931793 homie C June 3, 2018, 11:26 p.m. OK Python 2 TESTS 47 638 22528000 1400
38677878 exh3 C May 27, 2018, 7:21 p.m. OK Python 2 TESTS 47 685 19046400 1400
38663439 belkka C May 27, 2018, 3:16 p.m. OK Python 3 TESTS 47 483 8089600 1400
38664651 Savit_Gupta C May 27, 2018, 3:24 p.m. OK Python 3 TESTS 47 498 15872000 1400
38668434 sergovoy C May 27, 2018, 3:58 p.m. OK Python 3 TESTS 47 561 30720000 1400
38806272 Dambola C May 31, 2018, 3:18 p.m. OK Python 3 TESTS 47 623 25497600 1400
48272700 saku7 C Jan. 12, 2019, 3:35 a.m. OK Python 3 TESTS 47 624 7577600 1400
38988946 JSZX11556 C June 6, 2018, 8:55 a.m. OK Python 3 TESTS 47 685 2969600 1400
38707365 otidhc C May 29, 2018, 2:02 a.m. OK Python 3 TESTS 47 717 16691200 1400
38676111 yashtomar31 C May 27, 2018, 5:41 p.m. OK Python 3 TESTS 47 763 17510400 1400
66813023 lIn_nIl C Dec. 14, 2019, 4:11 a.m. OK Python 3 TESTS 47 779 12902400 1400
38696070 this-is-abandoned C May 28, 2018, 1:55 p.m. OK Python 3 TESTS 47 810 3481600 1400
38801341 Aivax C May 31, 2018, 12:16 p.m. OK Rust TESTS 47 498 3276800 1400
38811622 Aivax C May 31, 2018, 6:54 p.m. OK Rust TESTS 47 561 3276800 1400
38784640 Aivax C May 30, 2018, 8:17 p.m. OK Rust TESTS 47 561 12083200 1400

remove filters

Back to search problems