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 204390599 May 27, 2018, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 271 ) H K Paths PROGRAMMING combinatorics data structures dp fft math 2900

B"You are given a tree of n vertices. You are to select k (not necessarily distinct) simple paths in such a way that it is possible to split all edges of the tree into three sets: edges not contained in any path, edges that are a part of exactly one of these paths, and edges that are parts of all selected paths, and the latter set should be non-empty. Compute the number of ways to select k paths modulo 998244353 . The paths are enumerated, in other words, two ways are considered distinct if there are such i ( 1 <= q i <= q k ) and an edge that the i -th path contains the edge in one way and does not contain it in the other. The first line contains two integers n and k ( 1 <= q n, k <= q 10^{5} ) -- the number of vertices in the tree and the desired number of paths. The next n - 1 lines describe edges of the tree. Each line contains two integers a and b ( 1 <= a, b <= n , a ne b ) -- the endpoints of an edge. It is guaranteed that the given edges form a tree. Print the number of ways to select k enumerated not necessarily distinct simple paths in such a way that for each edge either it is not contained in any path, or it is contained in exactly one path, or it is contained in all k paths, and the intersection of all paths is non-empty. As the answer can be large, print it modulo 998244353 . In the first example the following ways are valid xef xbc x9a In the second example k=1 , so all n cdot (n - 1) / 2 = 5 cdot 4 / 2 = 10 paths are valid. In the third example, the answer is geq 998244353 , so it was taken modulo 998244353 , don't forget it! "...

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
38945430 Worldwide_D H June 4, 2018, 1:08 p.m. OK GNU C++ TESTS 68 1075 89395200 2900
39256888 vjudge3 H June 15, 2018, 4:13 a.m. OK GNU C++ TESTS 68 1216 80896000 2900
39289393 Notseefire H June 16, 2018, 1:58 p.m. OK GNU C++ TESTS 68 1341 28876800 2900
38769697 erge H May 30, 2018, 10:54 a.m. OK GNU C++ TESTS 68 1653 35840000 2900
64774075 SuperFF H Nov. 13, 2019, 2:43 a.m. OK GNU C++11 TESTS 68 624 239513600 2900
64194709 wh_bestwyj H Nov. 4, 2019, 9:12 a.m. OK GNU C++11 TESTS 68 655 26726400 2900
64193950 wh_bestwyj H Nov. 4, 2019, 8:54 a.m. OK GNU C++11 TESTS 68 655 26726400 2900
38939593 mr.Rosha H June 4, 2018, 9:09 a.m. OK GNU C++11 TESTS 68 701 21811200 2900
38766988 tqyaaaaaaaang H May 30, 2018, 9:22 a.m. OK GNU C++11 TESTS 68 702 21708800 2900
40471090 md_anim H July 17, 2018, 9:31 a.m. OK GNU C++11 TESTS 68 717 39833600 2900
53113613 251 H April 22, 2019, 6:08 a.m. OK GNU C++11 TESTS 68 733 20684800 2900
59234977 duality H Aug. 21, 2019, 5:03 p.m. OK GNU C++11 TESTS 68 763 13619200 2900
53111732 vjudge5 H April 22, 2019, 3:54 a.m. OK GNU C++11 TESTS 68 795 41881600 2900
54347636 Big_black_jujube H May 18, 2019, 1:14 p.m. OK GNU C++11 TESTS 68 795 99328000 2900
41307935 DOlaBMOon H Aug. 7, 2018, 2:07 p.m. OK GNU C++14 TESTS 68 405 34611200 2900
40932127 ReaLNero1 H July 30, 2018, 1:36 a.m. OK GNU C++14 TESTS 68 436 34611200 2900
38672896 tourist H May 27, 2018, 4:53 p.m. OK GNU C++14 TESTS 68 436 34611200 2900
53113683 piscium H April 22, 2019, 6:11 a.m. OK GNU C++14 TESTS 68 655 20889600 2900
41326003 DOlaBMOon H Aug. 8, 2018, 5:28 a.m. OK GNU C++14 TESTS 68 670 16691200 2900
41323492 DOlaBMOon H Aug. 8, 2018, 3:09 a.m. OK GNU C++14 TESTS 68 670 16691200 2900
39131680 abeker H June 10, 2018, 8:44 p.m. OK GNU C++14 TESTS 68 670 19558400 2900
41323114 DOlaBMOon H Aug. 8, 2018, 2:54 a.m. OK GNU C++14 TESTS 68 670 49459200 2900
41322967 DOlaBMOon H Aug. 8, 2018, 2:47 a.m. OK GNU C++14 TESTS 68 686 16691200 2900
38751216 Radewoosh H May 29, 2018, 8:26 p.m. OK GNU C++14 TESTS 68 686 40038400 2900
64899248 neal H Nov. 14, 2019, 6:04 p.m. OK GNU C++17 TESTS 68 280 19353600 2900
64898979 neal H Nov. 14, 2019, 5:57 p.m. OK GNU C++17 TESTS 68 296 17510400 2900
64898747 neal H Nov. 14, 2019, 5:51 p.m. OK GNU C++17 TESTS 68 327 18944000 2900
64898596 neal H Nov. 14, 2019, 5:47 p.m. OK GNU C++17 TESTS 68 327 19763200 2900
50884089 Trisolaris H March 6, 2019, 10:22 a.m. OK GNU C++17 TESTS 68 405 37888000 2900
50884166 Trisolaris H March 6, 2019, 10:25 a.m. OK GNU C++17 TESTS 68 436 32358400 2900
50884260 Trisolaris H March 6, 2019, 10:28 a.m. OK GNU C++17 TESTS 68 436 36864000 2900
50875354 Trisolaris H March 6, 2019, 5:50 a.m. OK GNU C++17 TESTS 68 452 22630400 2900
39857689 aryanc403 H July 2, 2018, 5:29 a.m. OK GNU C++17 TESTS 68 468 33177600 2900
64898254 neal H Nov. 14, 2019, 5:38 p.m. OK GNU C++17 TESTS 68 483 19763200 2900
40892800 mmaxio H July 28, 2018, 5:18 p.m. OK Java 8 TESTS 68 1357 40652800 2900
38752687 qwerty787788 H May 29, 2018, 10:03 p.m. OK Java 8 TESTS 68 1856 95232000 2900

remove filters

Back to search problems