CROC 2016 - Final Round [Private, For Onsite Finalists Only]

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
662 CROC 2016 - Final Round [Private, For Onsite Finalists Only] FINISHED False 7200 276882304 April 15, 2016, 2:15 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 497 ) A Gambling Nim PROGRAMMING bitmasks math matrices probabilities 2400

B'As you know, the game of "Nim" is played with n piles of stones, where the i-th pile initially contains ai stones. Two players alternate the turns. During a turn a player picks any non-empty pile and removes any positive number of stones from it. The one who is not able to make a move loses the game. Petya and Vasya are tired of playing Nim, so they invented their own version of the game and named it the "Gambling Nim". They have n two-sided cards, one side of the i-th card has number ai written on it, while the other side has number bi. At the beginning of the game the players put all the cards on the table, each card only one of its sides up, and this side is chosen independently and uniformly. Thus they obtain a sequence c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn, where ci is equal to ai or bi. Then they take n piles of stones, with i-th pile containing exactly ci stones and play Nim. Petya takes the first turn. Given that both players play optimally, find the probability of Petya 's victory. Output the answer as an irreducible fraction. The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89500 xe2 x80 x89000) -- the number of cards in the deck. Each of the following n lines contains the description of one card, consisting of two integers ai and bi (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018). Output the answer as an irreducible fraction p xe2 x80 x89/ xe2 x80 x89q. If the probability of Petya 's victory is 0, print 0/1. '...

Tutorials

Editorial for CROC 2016 Finals and Codeforces Round #347

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40984587 ReaLNero1 A July 30, 2018, 7:28 p.m. OK GNU C++ TESTS 140 265 11878400 2400
17428675 Arturia A April 21, 2016, 11:43 p.m. OK GNU C++ TESTS 140 265 14028800 2400
18153150 Lightning34 A May 30, 2016, 5:44 a.m. OK GNU C++ TESTS 140 280 6246400 2400
37782204 vjudge1 A April 30, 2018, 9:05 p.m. OK GNU C++ TESTS 140 342 15564800 2400
20900339 jiyutian A Sept. 25, 2016, 4:16 a.m. OK GNU C++ TESTS 140 390 11878400 2400
21380633 ZYQN A Oct. 12, 2016, 11:59 a.m. OK GNU C++ TESTS 140 421 10137600 2400
17435142 SanSiroWaltz A April 22, 2016, 1:20 p.m. OK GNU C++ TESTS 140 452 2048000 2400
23618692 vjudge2 A Jan. 7, 2017, 7:14 a.m. OK GNU C++ TESTS 140 452 13926400 2400
26811889 vjudge1 A May 3, 2017, 3:10 a.m. OK GNU C++ TESTS 140 467 5939200 2400
40904772 yedu153 A July 29, 2018, 4:29 a.m. OK GNU C++ TESTS 140 468 0 2400
61021382 rainboy A Sept. 21, 2019, 2:41 p.m. OK GNU C11 TESTS 140 436 0 2400
58153889 vjudge5 A Aug. 2, 2019, 4:26 a.m. OK GNU C++11 TESTS 140 249 0 2400
17471676 eddy1021 A April 23, 2016, 3:32 p.m. OK GNU C++11 TESTS 140 249 10342400 2400
68748942 luogu_bot5 A Jan. 14, 2020, 5:57 a.m. OK GNU C++11 TESTS 140 264 26726400 2400
58153738 vjudge5 A Aug. 2, 2019, 4:21 a.m. OK GNU C++11 TESTS 140 265 7987200 2400
68749394 vjudge1 A Jan. 14, 2020, 6:07 a.m. OK GNU C++11 TESTS 140 265 26726400 2400
17328821 savinov A April 15, 2016, 3:08 p.m. OK GNU C++11 TESTS 140 280 3993600 2400
43554133 yukuai26 A Sept. 29, 2018, 4:35 a.m. OK GNU C++11 TESTS 140 280 3993600 2400
58470063 vjudge5 A Aug. 8, 2019, 10:56 p.m. OK GNU C++11 TESTS 140 280 7987200 2400
23556595 Ragdoll A Jan. 5, 2017, 2:28 p.m. OK GNU C++11 TESTS 140 280 10137600 2400
53767055 asdfghjk A May 5, 2019, 1:21 a.m. OK GNU C++11 TESTS 140 280 51916800 2400
49836964 XLor A Feb. 12, 2019, 4:37 p.m. OK GNU C++14 TESTS 140 561 7987200 2400
66320755 Nazikk A Dec. 5, 2019, 1:56 p.m. OK GNU C++14 TESTS 140 561 8294400 2400
58328614 vjudge3 A Aug. 5, 2019, 8:37 a.m. OK GNU C++14 TESTS 140 561 11980800 2400
58328959 vjudge5 A Aug. 5, 2019, 8:44 a.m. OK GNU C++14 TESTS 140 561 12083200 2400
58112748 vjudge3 A Aug. 1, 2019, 7:49 a.m. OK GNU C++14 TESTS 140 576 0 2400
20925364 haleyk100198 A Sept. 26, 2016, 12:46 p.m. OK GNU C++14 TESTS 140 576 3993600 2400
49837021 vjudge2 A Feb. 12, 2019, 4:38 p.m. OK GNU C++14 TESTS 140 576 7987200 2400
56633199 Nazarov_Rodion A July 6, 2019, 5:43 p.m. OK GNU C++14 TESTS 140 576 12083200 2400
48543767 tusg25 A Jan. 18, 2019, 6:07 p.m. OK GNU C++14 TESTS 140 577 0 2400
54333965 Redpojoe A May 18, 2019, 7:14 a.m. OK GNU C++14 TESTS 140 577 3993600 2400
46918733 null_10007 A Dec. 12, 2018, 1:11 a.m. OK GNU C++17 TESTS 140 545 3993600 2400
47270292 Minnakhmetov A Dec. 19, 2018, 4:19 p.m. OK GNU C++17 TESTS 140 561 4096000 2400
58158128 vjudge1 A Aug. 2, 2019, 6:27 a.m. OK GNU C++17 TESTS 140 576 0 2400
58158159 vjudge2 A Aug. 2, 2019, 6:28 a.m. OK GNU C++17 TESTS 140 577 0 2400
44099085 vjudge4 A Oct. 11, 2018, 4:19 a.m. OK GNU C++17 TESTS 140 577 8294400 2400
44099168 vjudge2 A Oct. 11, 2018, 4:24 a.m. OK GNU C++17 TESTS 140 577 8294400 2400
62964855 -is-this-fft- A Oct. 20, 2019, 3:52 a.m. OK GNU C++17 TESTS 140 577 10035200 2400
58257485 vjudge2 A Aug. 4, 2019, 10:42 a.m. OK GNU C++17 TESTS 140 577 12083200 2400
58257454 vjudge3 A Aug. 4, 2019, 10:42 a.m. OK GNU C++17 TESTS 140 577 12083200 2400
59332030 Malomalomalomalo A Aug. 23, 2019, 1:54 a.m. OK GNU C++17 TESTS 140 592 6348800 2400
61021511 Dukkha A Sept. 21, 2019, 2:43 p.m. OK Java 8 TESTS 140 420 0 2400
17328614 Egor A April 15, 2016, 2:55 p.m. OK Java 8 TESTS 140 514 2969600 2400
18164903 rterte A May 31, 2016, 7:02 a.m. OK Java 8 TESTS 140 545 25600000 2400
17372918 darnley A April 18, 2016, 8:09 a.m. OK Java 8 TESTS 140 763 21196800 2400
17328160 VArtem A April 15, 2016, 2:26 p.m. OK Java 8 TESTS 140 764 0 2400
17779214 jagauthier A May 7, 2016, 1:54 p.m. OK Java 8 TESTS 140 764 20992000 2400
17684595 kuarc A May 2, 2016, 5:04 a.m. OK Java 8 TESTS 140 764 21504000 2400
17328981 darnley A April 15, 2016, 3:18 p.m. OK Java 8 TESTS 140 873 0 2400
17358693 niyaznigmatul A April 17, 2016, 6:35 a.m. OK Java 8 TESTS 140 1123 26521600 2400
17828242 AlexFetisov A May 10, 2016, 7:04 a.m. OK Java 8 TESTS 140 1138 21196800 2400
43644505 vjudge3 A Oct. 1, 2018, 1:08 p.m. OK MS C++ TESTS 140 576 7987200 2400

remove filters

Back to search problems