Codeforces Round 783 (Div. 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
1667 Codeforces Round 783 (Div. 1) FINISHED False 7200 81444299 April 19, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 670 ) E Centroid Probabilities PROGRAMMING combinatorics dp fft math 3000

B'Consider every tree (connected undirected acyclic graph) with n vertices ( n is odd, vertices numbered from 1 to n ), and for each 2 <= i <= n the i -th vertex is adjacent to exactly one vertex with a smaller index. For each i ( 1 <= i <= n ) calculate the number of trees for which the i -th vertex will be the centroid. The answer can be huge, output it modulo 998 ,244 ,353 . A vertex is called a centroid if its removal splits the tree into subtrees with at most (n-1)/2 vertices each. The first line contains an odd integer n ( 3 <= n < 2 cdot 10^5 , n is odd) -- the number of the vertices in the tree. Print n integers in a single line, the i -th integer is the answer for the i -th vertex (modulo 998 ,244 ,353 ). Example 1 : there are two possible trees: with edges (1-2) , and (1-3) -- here the centroid is 1 ; and with edges (1-2) , and (2-3) -- here the centroid is 2 . So the answer is 1, 1, 0 . Example 2 : there are 24 possible trees, for example with edges (1-2) , (2-3) , (3-4) , and (4-5) . Here the centroid is 3 . '...

Tutorials

Codeforces Round #783 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154150761 hos.lyric E April 19, 2022, 10:58 p.m. OK D TESTS 36 156 16896000 3000
154578603 rainboy E April 22, 2022, 4:47 p.m. OK GNU C11 TESTS 36 826 3174400 3000
154215998 rainboy E April 20, 2022, 4:38 p.m. OK GNU C11 TESTS 36 1404 15667200 3000
154171748 BeyondHeaven E April 20, 2022, 6:37 a.m. OK GNU C++14 TESTS 36 31 3993600 3000
154241604 leukocyte E April 21, 2022, 2:34 a.m. OK GNU C++14 TESTS 36 46 2457600 3000
154191292 ButterCake E April 20, 2022, 11:26 a.m. OK GNU C++14 TESTS 36 46 3174400 3000
154285404 -skyline- E April 21, 2022, 2:17 p.m. OK GNU C++14 TESTS 36 46 7987200 3000
154251866 realFZzzz E April 21, 2022, 6:36 a.m. OK GNU C++14 TESTS 36 62 4812800 3000
154164034 hydd E April 20, 2022, 4:29 a.m. OK GNU C++14 TESTS 36 62 5017600 3000
154164150 hydd E April 20, 2022, 4:31 a.m. OK GNU C++14 TESTS 36 62 5017600 3000
154132872 Noam527 E April 19, 2022, 5:56 p.m. OK GNU C++14 TESTS 36 108 3174400 3000
154249310 eecs E April 21, 2022, 5:42 a.m. OK GNU C++14 TESTS 36 109 3174400 3000
154201740 Chinese_zjc_ E April 20, 2022, 1:29 p.m. OK GNU C++14 TESTS 36 124 3174400 3000
154256058 Meredov E April 21, 2022, 7:53 a.m. OK GNU C++17 TESTS 36 46 2457600 3000
154213901 HappyPacMan E April 20, 2022, 4:07 p.m. OK GNU C++17 TESTS 36 46 2867200 3000
154179995 MonkeyKing E April 20, 2022, 8:42 a.m. OK GNU C++17 TESTS 36 46 3584000 3000
154183841 Intercept E April 20, 2022, 9:40 a.m. OK GNU C++17 TESTS 36 46 4812800 3000
154183905 Intercept E April 20, 2022, 9:41 a.m. OK GNU C++17 TESTS 36 46 4812800 3000
154155001 ouqingliang E April 20, 2022, 1:11 a.m. OK GNU C++17 TESTS 36 46 6451200 3000
154135657 YaoBIG E April 19, 2022, 6:15 p.m. OK GNU C++17 TESTS 36 62 4812800 3000
154184370 abc864197532 E April 20, 2022, 9:48 a.m. OK GNU C++17 TESTS 36 62 6451200 3000
154202157 ZayinLoveDafeng E April 20, 2022, 1:34 p.m. OK GNU C++17 TESTS 36 62 20070400 3000
154137927 wifiiii E April 19, 2022, 6:40 p.m. OK GNU C++17 TESTS 36 77 3174400 3000
154201352 CE_WA_TLE E April 20, 2022, 1:25 p.m. OK GNU C++17 (64) TESTS 36 30 38400000 3000
154176088 basic_string E April 20, 2022, 7:43 a.m. OK GNU C++17 (64) TESTS 36 31 2457600 3000
154248448 xyf007 E April 21, 2022, 5:23 a.m. OK GNU C++17 (64) TESTS 36 31 3174400 3000
154203285 exzang E April 20, 2022, 1:47 p.m. OK GNU C++17 (64) TESTS 36 31 3174400 3000
154243299 user202729_ E April 21, 2022, 3:17 a.m. OK GNU C++17 (64) TESTS 36 31 3276800 3000
154132685 est_stella E April 19, 2022, 5:55 p.m. OK GNU C++17 (64) TESTS 36 31 4812800 3000
154172210 AutumnKite E April 20, 2022, 6:44 a.m. OK GNU C++17 (64) TESTS 36 46 2457600 3000
154578641 rainboy E April 22, 2022, 4:47 p.m. OK GNU C++17 (64) TESTS 36 46 3072000 3000
154193983 froggyzhang E April 20, 2022, 11:58 a.m. OK GNU C++17 (64) TESTS 36 46 3174400 3000
154243529 zhangguangxuan99 E April 21, 2022, 3:23 a.m. OK GNU C++17 (64) TESTS 36 46 3174400 3000
154880021 TemurSempai E April 24, 2022, 5:59 p.m. OK GNU C++20 (64) TESTS 36 31 2457600 3000
154849643 deca_gon E April 24, 2022, 12:23 p.m. OK GNU C++20 (64) TESTS 36 31 2457600 3000
154441044 Mangooste E April 21, 2022, 9:06 p.m. OK GNU C++20 (64) TESTS 36 31 3993600 3000
154189761 SSerxhs E April 20, 2022, 11:06 a.m. OK GNU C++20 (64) TESTS 36 31 10444800 3000
154196721 luogu_bot4 E April 20, 2022, 12:31 p.m. OK GNU C++20 (64) TESTS 36 31 12800000 3000
154195349 LYC_music E April 20, 2022, 12:15 p.m. OK GNU C++20 (64) TESTS 36 31 19251200 3000
154195387 hjqiusl E April 20, 2022, 12:16 p.m. OK GNU C++20 (64) TESTS 36 31 19251200 3000
154121934 jiangly E April 19, 2022, 4:12 p.m. OK GNU C++20 (64) TESTS 36 46 3276800 3000
154187841 platelet E April 20, 2022, 10:38 a.m. OK GNU C++20 (64) TESTS 36 46 5836800 3000
154206879 ytkn E April 20, 2022, 2:30 p.m. OK GNU C++20 (64) TESTS 36 46 6963200 3000
154589849 conqueror_of_tourist E April 22, 2022, 6:55 p.m. OK PyPy 3-64 TESTS 36 249 30822400 3000
154156782 chinerist E April 20, 2022, 2 a.m. OK PyPy 3-64 TESTS 36 374 35430400 3000
154208395 sansen E April 20, 2022, 2:51 p.m. OK Rust 2021 TESTS 36 31 7987200 3000
154119667 qwerty787788 E April 19, 2022, 4:06 p.m. OK Rust 2021 TESTS 36 280 9011200 3000

remove filters

Back to search problems