Codeforces Round 593 (Div. 2)

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
1236 Codeforces Round 593 (Div. 2) FINISHED False 7200 166119887 Oct. 17, 2019, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 178 ) F Alice and the Cactus PROGRAMMING dfs and similar graphs math probabilities 2900

B"Alice recently found some cactuses growing near her house! After several months, more and more cactuses appeared and soon they blocked the road. So Alice wants to clear them. A cactus is a connected undirected graph. No edge of this graph lies on more than one simple cycle. Let's call a sequence of different nodes of the graph x_1, x_2, ldots, x_k a simple cycle, if k geq 3 and all pairs of nodes x_1 and x_2 , x_2 and x_3 , ldots , x_{k-1} and x_k , x_k and x_1 are connected with edges. Edges (x_1, x_2) , (x_2, x_3) , ldots , (x_{k-1}, x_k) , (x_k, x_1) lies on this simple cycle. There are so many cactuses, so it seems hard to destroy them. But Alice has magic. When she uses the magic, every node of the cactus will be removed independently with the probability frac{1}{2} . When a node is removed, the edges connected to it are also removed. Now Alice wants to test her magic. She has picked a cactus with n nodes and m edges. Let X[S] (where S is a subset of the removed nodes) be the number of connected components in the remaining graph after removing nodes of set S . Before she uses magic, she wants to know the variance of random variable X , if all nodes of the graph have probability frac{1}{2} to be removed and all n of these events are independent. By the definition the variance is equal to E[(X - E[X])^2] , where E[X] is the expected value of X . Help her and calculate this value by modulo 10^9+7 . Formally, let M = 10^9 + 7 (a prime number). It can be shown that the answer can be expressed as an irreducible fraction frac{p}{q} , where p and q are integers and q not equiv 0 pmod{M} . Output the integer equal to p cdot q^{-1} bmod M . In other words, find such an integer x that 0 <= x < M and x cdot q equiv p pmod{M} . The first line"...

Tutorials

70654

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62833166 rainboy F Oct. 17, 2019, 8:45 p.m. OK GNU C11 TESTS 122 249 27443200 2900
62832989 rainboy F Oct. 17, 2019, 8:40 p.m. OK GNU C11 TESTS 122 265 27443200 2900
68294536 yajnun F Jan. 6, 2020, 1:18 a.m. OK GNU C++11 TESTS 122 156 49356800 2900
68316331 star_magic_young F Jan. 6, 2020, 1:21 p.m. OK GNU C++11 TESTS 122 202 30310400 2900
68299735 Shrich F Jan. 6, 2020, 5:49 a.m. OK GNU C++11 TESTS 122 218 79360000 2900
68299712 Shrich F Jan. 6, 2020, 5:49 a.m. OK GNU C++11 TESTS 122 233 79360000 2900
68313249 Rubbish12345 F Jan. 6, 2020, 12:10 p.m. OK GNU C++11 TESTS 122 234 43622400 2900
68644621 vjudge5 F Jan. 12, 2020, 8:39 a.m. OK GNU C++11 TESTS 122 264 31334400 2900
67989055 dqa2020 F Dec. 31, 2019, 2:44 a.m. OK GNU C++11 TESTS 122 265 29900800 2900
63397316 dickings F Oct. 25, 2019, 5:05 p.m. OK GNU C++11 TESTS 122 327 42393600 2900
63397549 dickings F Oct. 25, 2019, 5:10 p.m. OK GNU C++11 TESTS 122 390 42393600 2900
63673425 Tiny F Oct. 28, 2019, 5:39 p.m. OK GNU C++11 TESTS 122 405 51609600 2900
69082299 wh_bestwyj F Jan. 19, 2020, 6:56 a.m. OK GNU C++14 TESTS 122 249 43110400 2900
68315468 iotang F Jan. 6, 2020, 1:02 p.m. OK GNU C++14 TESTS 122 358 58368000 2900
62846985 yan-zp F Oct. 18, 2019, 5:47 a.m. OK GNU C++14 TESTS 122 452 36147200 2900
62822246 Maripium F Oct. 17, 2019, 5:02 p.m. OK GNU C++14 TESTS 122 467 35020800 2900
63350358 arthurpd F Oct. 24, 2019, 9:25 p.m. OK GNU C++14 TESTS 122 498 33280000 2900
63349960 arthurpd F Oct. 24, 2019, 9:11 p.m. OK GNU C++14 TESTS 122 498 33280000 2900
62834065 _LeMur_ F Oct. 17, 2019, 9:13 p.m. OK GNU C++14 TESTS 122 498 49254400 2900
63911904 chenkuowen F Oct. 31, 2019, 8:36 a.m. OK GNU C++14 TESTS 122 498 160563200 2900
63219273 sajibreadd F Oct. 23, 2019, 7:23 a.m. OK GNU C++14 TESTS 122 499 43417600 2900
62937012 AlexLuchianov F Oct. 19, 2019, 2:23 p.m. OK GNU C++14 TESTS 122 702 51712000 2900
66163171 interestingLSY F Dec. 2, 2019, 5:57 a.m. OK GNU C++17 TESTS 122 295 36454400 2900
66163215 HatsuneMikuo F Dec. 2, 2019, 5:59 a.m. OK GNU C++17 TESTS 122 296 36454400 2900
66031489 ftiasch F Nov. 30, 2019, 10:18 a.m. OK GNU C++17 TESTS 122 389 27238400 2900
64548737 StepMommy F Nov. 8, 2019, 9:20 p.m. OK GNU C++17 TESTS 122 514 32768000 2900
63104868 xgcxgc F Oct. 22, 2019, 3:50 a.m. OK GNU C++17 TESTS 122 561 42291200 2900
67959727 programmisstt F Dec. 30, 2019, 11:05 a.m. OK GNU C++17 TESTS 122 576 44441600 2900
68927987 9baka_Cirno F Jan. 16, 2020, 10:44 a.m. OK GNU C++17 TESTS 122 670 43110400 2900
63086004 AliShahali1382 F Oct. 21, 2019, 4:36 p.m. OK GNU C++17 TESTS 122 733 48947200 2900
62828543 Benq F Oct. 17, 2019, 6:55 p.m. OK GNU C++17 TESTS 122 748 44236800 2900
67858134 vjudge3 F Dec. 29, 2019, 6:57 a.m. OK GNU C++17 TESTS 122 826 39833600 2900
62844378 dalt F Oct. 18, 2019, 4:47 a.m. OK Java 8 TESTS 122 1138 79257600 2900
62833165 Dukkha F Oct. 17, 2019, 8:45 p.m. OK Java 8 TESTS 122 1310 45977600 2900
62866772 AleksanderBalobanov F Oct. 18, 2019, 12:29 p.m. OK MS C++ 2017 TESTS 122 577 63692800 2900

remove filters

Back to search problems