Codeforces Round 901 (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
1874 Codeforces Round 901 (Div. 1) FINISHED False 10800 41095463 Sept. 30, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 755 ) D Jellyfish and Miku PROGRAMMING dp math probabilities

B"There are n + 1 cities with numbers from 0 to n , connected by n roads. The i -th (1 <= q i <= q n) road connects city i-1 and city i bi-directionally. After Jellyfish flew back to city 0 , she found out that she had left her Miku fufu in city n . Each road has a positive integer level of beauty. Denote the beauty of the i -th road as a_i . Jellyfish is trying to find her fufu. Because of her poor sense of direction, she doesn't know which way to go. Every day, she randomly chooses a road connected to the city she currently is in and traverses it. Let s be the sum of the beauty of the roads connected to the current city. For each road connected to the current city, Jellyfish will traverse the road with a probability of frac x s , where x is the beauty of the road, reaching the city on the other side of the road. Jellyfish will start at city 0 , and she will get only her fufu back when she reaches city n . You want to choose the beauty of the roads such that the expected number of days Jellyfish takes to find her fufu will be the minimum possible. However, due to limited funding, the sum of beauties of all roads must be less than or equal to m . Find the minimum expected number of days Jellyfish needs to get her fufu back if the beauty of the roads is chosen optimally. The first and only line of the input contains two integers n and m ( 1 <= q n <= q m <= q 3000 ) -- the number of the roads and the maximum sum of beauty of the roads. Output the minimum expected number of days Jellyfish needs to get her fufu back if the beauty of the roads is chosen optimally. Your answer will be accepted if the absolute or relative error does not exceed 10^{-9} . Formally, let your answer be a , and the jury's answer be b . Your answer is considered correct if frac{|a-b|}{ max(1,|b|)} <= q 10^{-9} . In the first example, the optimal assi"...

Tutorials

Codeforces Round 901 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
226061479 cqbzdj D Sept. 30, 2023, 5:31 p.m. OK GNU C++14 TESTS 80 77 72396800
226070438 llzer D Sept. 30, 2023, 6:42 p.m. OK GNU C++14 TESTS 81 108 108953600
226001491 PEIMUDA D Sept. 30, 2023, 3:59 p.m. OK GNU C++14 TESTS 80 140 108441600
226095176 xuanxuan001 D Oct. 1, 2023, 1:39 a.m. OK GNU C++14 TESTS 81 156 108339200
226037675 wangyian2022 D Sept. 30, 2023, 4:34 p.m. OK GNU C++14 TESTS 80 202 2150400
226052996 surajchip2 D Sept. 30, 2023, 5:10 p.m. OK GNU C++14 TESTS 80 202 108441600
226056838 sbzhangjianjun D Sept. 30, 2023, 5:20 p.m. OK GNU C++14 TESTS 80 233 77107200
226058966 BreakPlus D Sept. 30, 2023, 5:25 p.m. OK GNU C++14 TESTS 80 405 164864000
226056085 tujunbo D Sept. 30, 2023, 5:18 p.m. OK GNU C++14 TESTS 80 639 73625600
226063117 hxhhxh D Sept. 30, 2023, 5:34 p.m. OK GNU C++14 TESTS 80 997 133529600
226041080 RDDCCD D Sept. 30, 2023, 4:41 p.m. OK GNU C++17 TESTS 80 46 72396800
226105127 spsicio D Oct. 1, 2023, 4:17 a.m. OK GNU C++17 TESTS 81 62 72396800
225985427 hos.lyric D Sept. 30, 2023, 3:33 p.m. OK GNU C++17 TESTS 80 62 72601600
226026122 Iztrx D Sept. 30, 2023, 4:28 p.m. OK GNU C++17 TESTS 80 62 203776000
225983086 potato167 D Sept. 30, 2023, 3:30 p.m. OK GNU C++17 TESTS 80 78 102400
226070122 Potassium D Sept. 30, 2023, 6:40 p.m. OK GNU C++17 TESTS 81 93 72499200
225975684 EternalAlexander D Sept. 30, 2023, 3:19 p.m. OK GNU C++17 TESTS 80 93 108544000
226050026 Keshi D Sept. 30, 2023, 5:02 p.m. OK GNU C++17 TESTS 80 109 146227200
226096733 hayley17 D Oct. 1, 2023, 2:08 a.m. OK GNU C++17 TESTS 81 139 72396800
226055905 Faruzan D Sept. 30, 2023, 5:17 p.m. OK GNU C++17 TESTS 80 187 108544000
225958413 ooOAM D Sept. 30, 2023, 2:57 p.m. OK GNU C++17 (64) TESTS 80 31 102400
226038804 YocyCraft D Sept. 30, 2023, 4:36 p.m. OK GNU C++17 (64) TESTS 80 46 102400
225989175 Kubic D Sept. 30, 2023, 3:39 p.m. OK GNU C++17 (64) TESTS 80 46 72396800
226050713 heno239 D Sept. 30, 2023, 5:04 p.m. OK GNU C++17 (64) TESTS 80 62 8499200
225981937 Geothermal D Sept. 30, 2023, 3:28 p.m. OK GNU C++17 (64) TESTS 80 77 72089600
226046977 ainta D Sept. 30, 2023, 4:55 p.m. OK GNU C++17 (64) TESTS 80 78 72601600
226095313 zwh2008 D Oct. 1, 2023, 1:42 a.m. OK GNU C++17 (64) TESTS 81 93 72396800
225989950 orzdevinwang D Sept. 30, 2023, 3:40 p.m. OK GNU C++17 (64) TESTS 80 109 102400
226101037 zhangmj2008 D Oct. 1, 2023, 3:17 a.m. OK GNU C++17 (64) TESTS 81 109 72396800
226096251 Xylenox D Oct. 1, 2023, 1:59 a.m. OK GNU C++17 (64) TESTS 81 109 144691200
226052036 maroonrk D Sept. 30, 2023, 5:07 p.m. OK GNU C++20 (64) TESTS 80 46 102400
226044765 kmjp D Sept. 30, 2023, 4:50 p.m. OK GNU C++20 (64) TESTS 80 46 102400
225999596 A_G D Sept. 30, 2023, 3:56 p.m. OK GNU C++20 (64) TESTS 80 46 102400
225977564 ecnerwala D Sept. 30, 2023, 3:22 p.m. OK GNU C++20 (64) TESTS 80 46 102400
226069086 jtnydv25 D Sept. 30, 2023, 6:34 p.m. OK GNU C++20 (64) TESTS 81 46 72396800
226054898 A_zjzj D Sept. 30, 2023, 5:14 p.m. OK GNU C++20 (64) TESTS 80 61 72601600
226078484 neal D Sept. 30, 2023, 7:56 p.m. OK GNU C++20 (64) TESTS 81 62 0
226088822 lorenzoferrari D Sept. 30, 2023, 10:44 p.m. OK GNU C++20 (64) TESTS 81 62 102400
226073996 TeaPot D Sept. 30, 2023, 7:10 p.m. OK GNU C++20 (64) TESTS 81 62 102400
226048722 20333333333 D Sept. 30, 2023, 4:59 p.m. OK GNU C++20 (64) TESTS 80 62 2150400
226049259 FastFreeTask D Sept. 30, 2023, 5 p.m. OK Kotlin 1.6 TESTS 80 436 1126400
226060591 dyukha D Sept. 30, 2023, 5:29 p.m. OK Kotlin 1.6 TESTS 80 467 79052800
226080582 Tlatoani D Sept. 30, 2023, 8:19 p.m. OK Kotlin 1.6 TESTS 81 1559 79667200
226061955 darnley D Sept. 30, 2023, 5:32 p.m. OK Kotlin 1.7 TESTS 80 483 41062400
226046166 wkoo D Sept. 30, 2023, 4:53 p.m. OK PyPy 3-64 TESTS 80 483 125030400
226024057 sansen D Sept. 30, 2023, 4:24 p.m. OK Rust 2021 TESTS 80 171 0

remove filters

Back to search problems