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 |
---|---|---|---|---|---|---|
1543 | Codeforces Round 730 (Div. 2) | FINISHED | False | 8100 | 111684311 | July 7, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 5353 ) | C | Need for Pink Slips | PROGRAMMING | brute force dfs and similar implementation math probabilities |
B"After defeating a Blacklist Rival, you get a chance to draw 1 reward slip out of x hidden valid slips. Initially, x=3 and these hidden valid slips are Cash Slip, Impound Strike Release Marker and Pink Slip of Rival's Car. Initially, the probability of drawing these in a random guess are c , m , and p , respectively. There is also a volatility factor v . You can play any number of Rival Races as long as you don't draw a Pink Slip. Assume that you win each race and get a chance to draw a reward slip. In each draw, you draw one of the x valid items with their respective probabilities. Suppose you draw a particular item and its probability of drawing before the draw was a . Then, For example, You need the cars of Rivals. So, you need to find the expected number of races that you must play in order to draw a pink slip. The first line of input contains a single integer t ( 1 <= q t <= q 10 ) -- the number of test cases. The first and the only line of each test case contains four real numbers c , m , p and v ( 0 < c,m,p < 1 , c+m+p=1 , 0.1 <= q v <= q 0.9 ). Additionally, it is guaranteed that each of c , m , p and v have at most 4 decimal places. For each test case, output a single line containing a single real number -- the expected number of races that you must play in order to draw a Pink Slip. Your answer is considered correct if its absolute or relative error does not exceed 10^{-6} . Formally, let your answer be a , and the jury's answer be b . Your answer is accepted if and only if frac{|a - b|}{ max{(1, |b|)}} <= 10^{-6} . For the first test case, the possible drawing sequences are: For the second test case, the possible drawing sequences are: So, the expected number of races is equal to 1 cdot 0.4 + 2 cdot 0.24 + 3 cdot 0.16 + 2 cdot 0.1 + 3 cdot 0.1 = 1.86 . "... |
Codeforces Round #730 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
121682022 | persistent | C | July 8, 2021, 4:52 a.m. | OK | Clang++17 Diagnostics | TESTS | 12 | 46 | 0 | ||
121671757 | vjudge4 | C | July 8, 2021, 1:38 a.m. | OK | Clang++17 Diagnostics | TESTS | 12 | 61 | 0 | ||
121661702 | wallee | C | July 7, 2021, 8:11 p.m. | OK | Clang++17 Diagnostics | TESTS | 12 | 77 | 0 | ||
121663085 | eastnman | C | July 7, 2021, 8:40 p.m. | OK | Delphi | TESTS | 12 | 124 | 102400 | ||
121660778 | rainboy | C | July 7, 2021, 7:54 p.m. | OK | GNU C11 | TESTS | 12 | 15 | 0 | ||
121642892 | yycyyc | C | July 7, 2021, 4:37 p.m. | OK | GNU C11 | TESTS | 12 | 15 | 0 | ||
121666490 | he1icob4ct3r | C | July 7, 2021, 10:20 p.m. | OK | GNU C11 | TESTS | 12 | 31 | 0 | ||
121677238 | NJUSigma | C | July 8, 2021, 3:31 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121676285 | kxsk | C | July 8, 2021, 3:13 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121675773 | kitalekita | C | July 8, 2021, 3:04 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121680651 | Duck_sajin | C | July 8, 2021, 4:31 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121686191 | KIKO_cindy | C | July 8, 2021, 5:45 a.m. | OK | GNU C++11 | TESTS | 13 | 15 | 0 | ||
121685751 | WWLDX | C | July 8, 2021, 5:40 a.m. | OK | GNU C++11 | TESTS | 13 | 15 | 0 | ||
121681246 | ziyou_zi | C | July 8, 2021, 4:40 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121680313 | dyadi | C | July 8, 2021, 4:24 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121679784 | Aiburito | C | July 8, 2021, 4:15 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121677678 | DerekYeh | C | July 8, 2021, 3:38 a.m. | OK | GNU C++11 | TESTS | 12 | 15 | 0 | ||
121676104 | DuyAnhTM | C | July 8, 2021, 3:10 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 0 | ||
121667428 | Aur0Ra | C | July 7, 2021, 10:59 p.m. | OK | GNU C++14 | TESTS | 12 | 15 | 0 | ||
121666827 | smallfang.qwq | C | July 7, 2021, 10:35 p.m. | OK | GNU C++14 | TESTS | 12 | 15 | 0 | ||
121643241 | WhiteFox | C | July 7, 2021, 4:38 p.m. | OK | GNU C++14 | TESTS | 12 | 15 | 0 | ||
121673747 | Sunny_days | C | July 8, 2021, 2:24 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 102400 | ||
121679225 | Duy_e | C | July 8, 2021, 4:05 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 102400 | ||
121678972 | tnaito | C | July 8, 2021, 4:01 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 102400 | ||
121677812 | pranjalsinha1965 | C | July 8, 2021, 3:40 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 102400 | ||
121669610 | creampuffshu | C | July 8, 2021, 12:34 a.m. | OK | GNU C++14 | TESTS | 12 | 15 | 102400 | ||
121667638 | Bob | C | July 7, 2021, 11:08 p.m. | OK | GNU C++14 | TESTS | 12 | 15 | 102400 | ||
121678765 | scau_wuwang | C | July 8, 2021, 3:57 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121675734 | jonathanirvings | C | July 8, 2021, 3:04 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121672336 | Horizon01 | C | July 8, 2021, 1:52 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121671362 | __October | C | July 8, 2021, 1:29 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121670314 | F_know | C | July 8, 2021, 1 a.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121657834 | JulSjlv | C | July 7, 2021, 7:07 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121654983 | LptN21 | C | July 7, 2021, 6:36 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121647857 | Steve-Liu | C | July 7, 2021, 4:48 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121647794 | TimmyChiang | C | July 7, 2021, 4:48 p.m. | OK | GNU C++17 | TESTS | 12 | 15 | 0 | ||
121685430 | sindhushapadmanabhuni | C | July 8, 2021, 5:37 a.m. | OK | GNU C++17 | TESTS | 13 | 15 | 102400 | ||
121683129 | prasanna2425 | C | July 8, 2021, 5:08 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121680689 | AMO5 | C | July 8, 2021, 4:31 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121678791 | Lavine | C | July 8, 2021, 3:58 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121678021 | Mystery1111 | C | July 8, 2021, 3:44 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121677972 | Lavine | C | July 8, 2021, 3:43 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121675532 | vineeth_kada | C | July 8, 2021, 3 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121675427 | MQFLLY | C | July 8, 2021, 2:58 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121673434 | SAXYAM | C | July 8, 2021, 2:18 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121671968 | YSJY19981124 | C | July 8, 2021, 1:43 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121670384 | TheNerd06 | C | July 8, 2021, 1:02 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 15 | 0 | ||
121667530 | glebsamsonov | C | July 7, 2021, 11:03 p.m. | OK | Go | TESTS | 12 | 31 | 0 | ||
121686279 | sarthakmanna | C | July 8, 2021, 5:46 a.m. | OK | Java 11 | TESTS | 13 | 187 | 0 | ||
121668057 | Plums | C | July 7, 2021, 11:26 p.m. | OK | Java 11 | TESTS | 12 | 187 | 0 | ||
121665305 | Arbitrary2912 | C | July 7, 2021, 9:40 p.m. | OK | Java 11 | TESTS | 12 | 187 | 0 | ||
121665197 | Arbitrary2912 | C | July 7, 2021, 9:36 p.m. | OK | Java 11 | TESTS | 12 | 187 | 0 | ||
121665231 | Arbitrary2912 | C | July 7, 2021, 9:38 p.m. | OK | Java 11 | TESTS | 12 | 202 | 0 | ||
121653006 | gautamgosain04 | C | July 7, 2021, 6:20 p.m. | OK | Java 11 | TESTS | 12 | 202 | 0 | ||
121664839 | Debojit219 | C | July 7, 2021, 9:26 p.m. | OK | Java 11 | TESTS | 12 | 202 | 0 | ||
121669329 | Rick_19 | C | July 8, 2021, 12:23 a.m. | OK | Java 11 | TESTS | 12 | 202 | 0 | ||
121663455 | Debojit219 | C | July 7, 2021, 8:48 p.m. | OK | Java 11 | TESTS | 12 | 233 | 0 | ||
121664865 | Debojit219 | C | July 7, 2021, 9:27 p.m. | OK | Java 11 | TESTS | 12 | 233 | 0 | ||
121657622 | guru1603 | C | July 7, 2021, 7:04 p.m. | OK | Java 8 | TESTS | 12 | 155 | 0 | ||
121656667 | Lior | C | July 7, 2021, 6:53 p.m. | OK | Java 8 | TESTS | 12 | 155 | 0 | ||
121642491 | kzhang2012 | C | July 7, 2021, 4:36 p.m. | OK | Java 8 | TESTS | 12 | 156 | 0 | ||
121655348 | Shemo | C | July 7, 2021, 6:39 p.m. | OK | Java 8 | TESTS | 12 | 170 | 0 | ||
121646511 | GoldenShadow | C | July 7, 2021, 4:45 p.m. | OK | Java 8 | TESTS | 12 | 171 | 0 | ||
121686800 | honeysingh18 | C | July 8, 2021, 5:52 a.m. | OK | Java 8 | TESTS | 13 | 186 | 0 | ||
121647494 | aabzac | C | July 7, 2021, 4:47 p.m. | OK | Java 8 | TESTS | 12 | 186 | 0 | ||
121653661 | Huaxia_Power | C | July 7, 2021, 6:25 p.m. | OK | Java 8 | TESTS | 12 | 639 | 0 | ||
121660803 | dandoh | C | July 7, 2021, 7:55 p.m. | OK | Kotlin | TESTS | 12 | 124 | 0 | ||
121655883 | Ant_Man | C | July 7, 2021, 6:45 p.m. | OK | Kotlin | TESTS | 12 | 217 | 0 | ||
121644432 | shin2ro | C | July 7, 2021, 4:41 p.m. | OK | Kotlin | TESTS | 12 | 265 | 102400 | ||
121675310 | swz | C | July 8, 2021, 2:56 a.m. | OK | MS C++ 2017 | TESTS | 12 | 15 | 0 | ||
121645840 | Cube219 | C | July 7, 2021, 4:44 p.m. | OK | MS C++ 2017 | TESTS | 12 | 15 | 0 | ||
121673371 | jrlqw | C | July 8, 2021, 2:16 a.m. | OK | MS C++ 2017 | TESTS | 12 | 30 | 0 | ||
121675018 | swz | C | July 8, 2021, 2:50 a.m. | OK | MS C++ 2017 | TESTS | 12 | 30 | 0 | ||
121671471 | the-fly0618 | C | July 8, 2021, 1:32 a.m. | OK | MS C++ 2017 | TESTS | 12 | 31 | 0 | ||
121673163 | MrLuoTrue | C | July 8, 2021, 2:11 a.m. | OK | MS C++ 2017 | TESTS | 12 | 31 | 0 | ||
121653907 | anfaloved | C | July 7, 2021, 6:27 p.m. | OK | MS C++ 2017 | TESTS | 12 | 31 | 0 | ||
121645438 | grey | C | July 7, 2021, 4:43 p.m. | OK | MS C++ 2017 | TESTS | 12 | 46 | 0 | ||
121660958 | lionvs132 | C | July 7, 2021, 7:57 p.m. | OK | .NET Core C# | TESTS | 12 | 92 | 102400 | ||
121655803 | thetansquared | C | July 7, 2021, 6:44 p.m. | OK | .NET Core C# | TESTS | 12 | 109 | 0 | ||
121653378 | azukun | C | July 7, 2021, 6:23 p.m. | OK | .NET Core C# | TESTS | 12 | 109 | 409600 | ||
121652576 | bcollet | C | July 7, 2021, 6:18 p.m. | OK | PyPy 2 | TESTS | 12 | 93 | 716800 | ||
121670082 | lebron87 | C | July 8, 2021, 12:52 a.m. | OK | PyPy 2 | TESTS | 12 | 421 | 10752000 | ||
121680466 | vaibhav_india | C | July 8, 2021, 4:27 a.m. | OK | PyPy 3 | TESTS | 12 | 171 | 8396800 | ||
121653153 | augurar | C | July 7, 2021, 6:21 p.m. | OK | PyPy 3 | TESTS | 12 | 187 | 15667200 | ||
121669428 | thhsu | C | July 8, 2021, 12:27 a.m. | OK | PyPy 3 | TESTS | 12 | 202 | 9318400 | ||
121661491 | agarus | C | July 7, 2021, 8:07 p.m. | OK | PyPy 3 | TESTS | 12 | 217 | 74342400 | ||
121647115 | Nemisis2.O | C | July 7, 2021, 4:47 p.m. | OK | PyPy 3 | TESTS | 12 | 218 | 4915200 | ||
121662415 | silvertint | C | July 7, 2021, 8:26 p.m. | OK | PyPy 3 | TESTS | 12 | 218 | 8601600 | ||
121661010 | novahow | C | July 7, 2021, 7:58 p.m. | OK | PyPy 3 | TESTS | 12 | 233 | 9420800 | ||
121665030 | Mai_hoo_kaun | C | July 7, 2021, 9:32 p.m. | OK | PyPy 3 | TESTS | 12 | 233 | 9523200 | ||
121666730 | zouhrydoussama | C | July 7, 2021, 10:31 p.m. | OK | PyPy 3 | TESTS | 12 | 249 | 9625600 | ||
121674417 | LMTu | C | July 8, 2021, 2:38 a.m. | OK | PyPy 3 | TESTS | 12 | 264 | 9216000 | ||
121658642 | islingr | C | July 7, 2021, 7:17 p.m. | OK | Python 3 | TESTS | 12 | 108 | 409600 | ||
121677723 | devils_Eye1 | C | July 8, 2021, 3:38 a.m. | OK | Python 3 | TESTS | 12 | 373 | 0 | ||
121662433 | silvertint | C | July 7, 2021, 8:26 p.m. | OK | Python 3 | TESTS | 12 | 405 | 0 | ||
121673653 | jeongdongha | C | July 8, 2021, 2:21 a.m. | OK | Python 3 | TESTS | 12 | 467 | 102400 | ||
121656815 | dufresne_1949 | C | July 7, 2021, 6:54 p.m. | OK | Python 3 | TESTS | 12 | 483 | 0 | ||
121652547 | abhi_dhanraj | C | July 7, 2021, 6:18 p.m. | OK | Python 3 | TESTS | 12 | 623 | 0 | ||
121666786 | phamxuanhien15 | C | July 7, 2021, 10:33 p.m. | OK | Python 3 | TESTS | 12 | 639 | 4096000 | ||
121678352 | dyliloveyou | C | July 8, 2021, 3:50 a.m. | OK | Python 3 | TESTS | 12 | 655 | 102400 | ||
121644153 | poppyer | C | July 7, 2021, 4:40 p.m. | OK | Python 3 | TESTS | 12 | 717 | 0 | ||
121642021 | newbie00 | C | July 7, 2021, 4:35 p.m. | OK | Python 3 | TESTS | 12 | 732 | 0 | ||
121642508 | Epikem | C | July 7, 2021, 4:36 p.m. | OK | Rust | TESTS | 12 | 31 | 0 |
Back to search problems