Bubble Cup 9 - Finals [Online Mirror]

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
717 Bubble Cup 9 - Finals [Online Mirror] FINISHED False 18000 302821223 Sept. 11, 2016, 9 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1579 ) D Dexterina’s Lab PROGRAMMING games matrices probabilities 1900

Dexterina and Womandark have been arch-rivals since they’ve known each other. Since both are super-intelligent teenage girls, they’ve always been trying to solve their disputes in a peaceful and nonviolent way. After god knows how many different challenges they’ve given to one another, their score is equal and they’re both desperately trying to best the other in various games of wits. This time, Dexterina challenged Womandark to a game of Nim. Nim is a two-player game in which players take turns removing objects from distinct heaps. On each turn, a player must remove at least one object, and may remove any number of objects from a single heap. The player who can't make a turn loses. By their agreement, the sizes of piles are selected randomly from the range 0, x . Each pile's size is taken independently from the same probability distribution that is known before the start of the game. Womandark is coming up with a brand new and evil idea on how to thwart Dexterina’s plans, so she hasn’t got much spare time. She, however, offered you some tips on looking fabulous in exchange for helping her win in Nim. Your task is to tell her what is the probability that the first player to play wins, given the rules as above. The first line of the input contains two integers n ( 1 ≤ n ≤ 10 9 ) and x ( 1 ≤ x ≤ 100 ) — the number of heaps and the maximum number of objects in a heap, respectively. The second line contains x + 1 real numbers, given with up to 6 decimal places each: P (0), P (1), ... , P ( X ) . Here, P ( i ) is the probability of a heap having exactly i objects in start of a game. It's guaranteed that the sum of all P ( i ) is equal to 1 . Output a single real number, the probability that the first player wins. The answer will be judged as correct if it differs from the correct answer by at most 10 - 6 .

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
20758858 vkozlovs D Sept. 19, 2016, 3:11 p.m. OK FPC TESTS 11 592 819200 1900
21418773 sgtlaugh D Oct. 14, 2016, 8:44 a.m. OK GNU C TESTS 11 15 1843200 1900
21408201 sgtlaugh D Oct. 13, 2016, 4:51 p.m. OK GNU C TESTS 11 15 1843200 1900
31190202 vjudge1 D Oct. 10, 2017, 12:57 p.m. OK GNU C++ TESTS 11 15 0 1900
31145609 vjudge5 D Oct. 8, 2017, 1:40 p.m. OK GNU C++ TESTS 11 15 0 1900
20758747 MiracleInLife D Sept. 19, 2016, 3:06 p.m. OK GNU C++ TESTS 11 15 0 1900
20722857 1A2012 D Sept. 18, 2016, 1:31 a.m. OK GNU C++ TESTS 11 15 0 1900
20636449 sahilgrover alecsyde TerryMcGinnis D Sept. 15, 2016, 9:29 a.m. OK GNU C++ TESTS 11 15 0 1900
20569194 736248591 D Sept. 13, 2016, 2:33 p.m. OK GNU C++ TESTS 11 15 0 1900
20551014 lsc4719 D Sept. 12, 2016, 2:37 p.m. OK GNU C++ TESTS 11 15 0 1900
20542882 stonepage D Sept. 12, 2016, 4:44 a.m. OK GNU C++ TESTS 11 15 0 1900
20536213 _Ash__ D Sept. 11, 2016, 4:37 p.m. OK GNU C++ TESTS 11 15 0 1900
20531708 Eat_KFC hiThere23 D Sept. 11, 2016, 12:52 p.m. OK GNU C++ TESTS 11 15 0 1900
32092958 permui D Nov. 6, 2017, 11:49 a.m. OK GNU C++11 TESTS 11 15 0 1900
27307355 Cache D May 23, 2017, 7:05 p.m. OK GNU C++11 TESTS 11 15 0 1900
22401113 -XraY- D Nov. 22, 2016, 10:50 a.m. OK GNU C++11 TESTS 11 15 0 1900
20959404 code_cola D Sept. 28, 2016, 3:36 a.m. OK GNU C++11 TESTS 11 15 0 1900
20912917 otrecnoc D Sept. 25, 2016, 5:40 p.m. OK GNU C++11 TESTS 11 15 0 1900
20718162 ivan100sic D Sept. 17, 2016, 7:10 p.m. OK GNU C++11 TESTS 11 15 0 1900
20671790 RunningPhoton D Sept. 17, 2016, 2:53 a.m. OK GNU C++11 TESTS 11 15 0 1900
20646077 I_love_Captain_America D Sept. 15, 2016, 6:01 p.m. OK GNU C++11 TESTS 11 15 0 1900
20625367 yzyz D Sept. 14, 2016, 6:32 p.m. OK GNU C++11 TESTS 11 15 0 1900
20613396 Anastasiya.Zhyr D Sept. 14, 2016, 12:06 p.m. OK GNU C++11 TESTS 11 15 0 1900
67844525 UnableToCan D Dec. 28, 2019, 8:50 p.m. OK GNU C++14 TESTS 11 15 0 1900
56182931 walht D June 28, 2019, 1:58 a.m. OK GNU C++14 TESTS 11 15 0 1900
22925919 NiroBC D Dec. 13, 2016, 12:17 p.m. OK GNU C++14 TESTS 11 15 0 1900
22093108 Motarack D Nov. 7, 2016, 11:26 a.m. OK GNU C++14 TESTS 11 15 0 1900
20549579 letiaway D Sept. 12, 2016, 1:10 p.m. OK GNU C++14 TESTS 11 15 0 1900
20525499 jiaqiyang ExfJoe AcrossTheSky D Sept. 11, 2016, 9:30 a.m. OK GNU C++14 TESTS 11 15 0 1900
20524713 PopovkinAndrey WHITE2302 Alladdin D Sept. 11, 2016, 9:14 a.m. OK GNU C++14 TESTS 11 15 0 1900
50074619 LODB---D D Feb. 17, 2019, 8:06 p.m. OK GNU C++14 TESTS 11 15 102400 1900
22634373 vovanstrr D Dec. 1, 2016, 7:21 a.m. OK GNU C++14 TESTS 11 15 102400 1900
20524998 nuip satashun sugim48 D Sept. 11, 2016, 9:20 a.m. OK GNU C++14 TESTS 11 15 102400 1900
68727461 pedrohlf D Jan. 13, 2020, 6:27 p.m. OK GNU C++17 TESTS 11 15 0 1900
68727334 pedrohlf D Jan. 13, 2020, 6:25 p.m. OK GNU C++17 TESTS 11 15 0 1900
67056265 Theaktis D Dec. 17, 2019, 7 a.m. OK GNU C++17 TESTS 11 15 102400 1900
57166142 FlowerOfSorrow D July 16, 2019, 10:59 p.m. OK GNU C++17 TESTS 11 15 102400 1900
55616606 ivan100sic D June 16, 2019, 9:21 a.m. OK GNU C++17 TESTS 11 15 204800 1900
60697674 disposed D Sept. 16, 2019, 8:38 p.m. OK GNU C++17 TESTS 11 30 204800 1900
54572111 Rahul D May 24, 2019, 8 p.m. OK GNU C++17 TESTS 11 30 204800 1900
66742696 rohit_goyal D Dec. 12, 2019, 10 p.m. OK GNU C++17 TESTS 11 31 204800 1900
64683469 ashish11 D Nov. 11, 2019, 10:57 a.m. OK GNU C++17 TESTS 11 31 204800 1900
59633042 maxnguyen D Aug. 28, 2019, 7:06 p.m. OK GNU C++17 TESTS 11 31 204800 1900
47313246 wery0 D Dec. 20, 2018, 10:21 p.m. OK Java 8 TESTS 11 109 0 1900
45491573 sirknightingfail D Nov. 9, 2018, 7:24 p.m. OK Java 8 TESTS 11 109 0 1900
20530485 Dekacc D Sept. 11, 2016, 12:03 p.m. OK Java 8 TESTS 11 139 0 1900
20539440 ic97usop D Sept. 11, 2016, 8:05 p.m. OK Java 8 TESTS 11 140 0 1900
20524949 YakutovDmitriy niyaznigmatul D Sept. 11, 2016, 9:18 a.m. OK Java 8 TESTS 11 233 0 1900
20525654 pitfall Slamur Petruchcho D Sept. 11, 2016, 9:33 a.m. OK Java 8 TESTS 11 248 0 1900
50320671 ViciousCoder D Feb. 22, 2019, 2:23 p.m. OK Java 8 TESTS 11 373 0 1900
20534804 fnch D Sept. 11, 2016, 3:07 p.m. OK Java 8 TESTS 11 389 0 1900
20534721 fnch D Sept. 11, 2016, 3:03 p.m. OK Java 8 TESTS 11 389 0 1900
25776061 Badry MedoN11 D March 24, 2017, 2:39 p.m. OK Java 8 TESTS 11 389 20889600 1900
20537806 azukun D Sept. 11, 2016, 6:22 p.m. OK MS C# TESTS 11 608 5734400 1900
20528254 mircea85 D Sept. 11, 2016, 10:44 a.m. OK MS C# TESTS 11 686 3379200 1900
20526232 rkm0959 D Sept. 11, 2016, 9:48 a.m. OK MS C++ TESTS 11 15 0 1900
20526210 kingmoshe D Sept. 11, 2016, 9:48 a.m. OK MS C++ TESTS 11 15 0 1900
20546480 NotEvenWrong D Sept. 12, 2016, 9:55 a.m. OK MS C++ TESTS 11 15 102400 1900
20525539 SaMer AU.Bahosain Hasan0540 D Sept. 11, 2016, 9:31 a.m. OK MS C++ TESTS 11 15 102400 1900
20528192 TheConfessor wilcot i_love_gold_and_nt D Sept. 11, 2016, 10:42 a.m. OK MS C++ TESTS 11 93 409600 1900
56190520 vjudge2 D June 28, 2019, 7:17 a.m. OK MS C++ TESTS 11 93 1433600 1900
20829115 vjudge4 D Sept. 23, 2016, 2:22 a.m. OK MS C++ TESTS 11 93 2150400 1900
23920488 sister_what_hate_most D Jan. 18, 2017, 11:30 a.m. OK MS C++ TESTS 11 93 2764800 1900
20829107 yyffw D Sept. 23, 2016, 2:21 a.m. OK MS C++ TESTS 11 109 2150400 1900
20538783 veschii_nevstrui D Sept. 11, 2016, 7:22 p.m. OK MS C++ TESTS 11 109 15257600 1900
63655794 YHHxBULIATANIA D Oct. 28, 2019, 12:39 p.m. OK MS C++ 2017 TESTS 11 124 4915200 1900
56293834 C20191522 D June 30, 2019, 4:05 a.m. OK MS C++ 2017 TESTS 11 295 33484800 1900
64629679 O_Ramanujan D Nov. 10, 2019, 9:43 a.m. OK PyPy 3 TESTS 11 156 1945600 1900
52468269 tcchung D April 7, 2019, 4:59 p.m. OK PyPy 3 TESTS 11 170 819200 1900
29285114 --d D Aug. 8, 2017, 12:38 p.m. OK Python 3 TESTS 11 249 4915200 1900

remove filters

Back to search problems