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 |
---|---|---|---|---|---|---|
1184 | Helvetic Coding Contest 2019 online mirror (teams allowed, unrated) | FINISHED | False | 16200 | 174956087 | July 7, 2019, 7:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 109 ) | D2 | Parallel Universes (Hard) | PROGRAMMING | math matrices | 3300 |
B"Heidi enjoyed performing the simulation because she knew exactly when a new universe would be formed and where, and when a non-existent link would be broken and where. However, the multiverse itself works in mysterious ways. Well, it works using probabilities, which to some people is mysterious. At each unit time, when a decision is made, one of the two events will happen randomly. Let's denote l as the current length of the multiverse. With a probability of p_{create} = 1 - frac{l}{m} , a universe will be created. With a probability of p_{break}= frac{l}{m} , a non-existent link will be broken at some position. More specifically, As earlier, the Doctor remains in the same universe. However, if at some point the multiverse breaks in such a way that the Doctor finds himself at the leftmost or rightmost end of it, the TARDIS stops functioning. In such a case, the Doctor must actually walk across the multiverse to find the tools to fix it. We are interested in the expected value of the length of the multiverse when such an event occurs. The first and only line contains three integers n , k and m (1 <= k <= n <= m <= 250) , the initial length of the multiverse, the initial position of the Doctor, and the maximum possible length of the multiverse. Output a single integer on a single line, indicating the expected length of the multiverse. If the answer is frac{p}{q} , please print r where p equiv r cdot q ( text{mod } 10^9 + 7) . For the first and the second test case, without any change to the multiverse, the Doctor is already at one of the ends. For the third test case, the multiverse can only break at a position, which renders the Doctor at one of its ends. For the fourth case, things seem to be a little more complicated, because the multiverse can grow and then be broken again. "... |
helvetic-coding-contest-2019-editorial.pdf |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
56664705 | cuizhuyefei MarkF zx2003 | D2 | July 7, 2019, 10:54 a.m. | OK | GNU C++11 | TESTS | 30 | 311 | 250470400 | 3300 | |
57865325 | lopare | D2 | July 27, 2019, 8:35 p.m. | OK | GNU C++11 | TESTS | 30 | 405 | 133017600 | 3300 | |
57709751 | py_ultron | D2 | July 24, 2019, 10:48 p.m. | OK | GNU C++11 | TESTS | 30 | 405 | 133017600 | 3300 | |
56715238 | yyf0309 | D2 | July 8, 2019, 2:23 p.m. | OK | GNU C++11 | TESTS | 30 | 483 | 67481600 | 3300 | |
56662502 | FizzyDavid 300iq TLE | D2 | July 7, 2019, 10:18 a.m. | OK | GNU C++11 | TESTS | 30 | 670 | 192716800 | 3300 | |
56695252 | zsyzsy | D2 | July 8, 2019, 6:40 a.m. | OK | GNU C++14 | TESTS | 30 | 311 | 133222400 | 3300 | |
56667135 | dorijanlendvaj tmwilliamlin168 | D2 | July 7, 2019, 11:30 a.m. | OK | GNU C++14 | TESTS | 30 | 467 | 211660800 | 3300 | |
56712989 | krijgertje | D2 | July 8, 2019, 1:25 p.m. | OK | GNU C++14 | TESTS | 30 | 763 | 100454400 | 3300 | |
58803544 | wakaka | D2 | Aug. 14, 2019, 8:09 a.m. | OK | GNU C++14 | TESTS | 30 | 936 | 197017600 | 3300 | |
69652024 | gongsuidashen | D2 | Jan. 28, 2020, 5:45 a.m. | OK | GNU C++17 | TESTS | 30 | 312 | 250470400 | 3300 | |
56770140 | Benq | D2 | July 9, 2019, 9 p.m. | OK | GNU C++17 | TESTS | 30 | 390 | 99532800 | 3300 | |
56769932 | Benq | D2 | July 9, 2019, 8:50 p.m. | OK | GNU C++17 | TESTS | 30 | 404 | 99532800 | 3300 | |
56689277 | halley_comet | D2 | July 8, 2019, 2:28 a.m. | OK | GNU C++17 | TESTS | 30 | 452 | 211660800 | 3300 | |
56667104 | dorijanlendvaj tmwilliamlin168 | D2 | July 7, 2019, 11:29 a.m. | OK | GNU C++17 | TESTS | 30 | 467 | 211660800 | 3300 | |
60423262 | RNS_JKS RNS_KSB | D2 | Sept. 12, 2019, 7:06 a.m. | OK | GNU C++17 | TESTS | 30 | 468 | 103014400 | 3300 | |
56852574 | chemthan | D2 | July 11, 2019, 4:28 p.m. | OK | GNU C++17 | TESTS | 30 | 561 | 131993600 | 3300 | |
59262385 | maroonrk | D2 | Aug. 22, 2019, 9:07 a.m. | OK | GNU C++17 | TESTS | 30 | 639 | 126464000 | 3300 | |
56769875 | Benq | D2 | July 9, 2019, 8:48 p.m. | OK | GNU C++17 | TESTS | 30 | 3993 | 99532800 | 3300 |
Back to search problems