Codeforces Round 340 (Div. 2)

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
617 Codeforces Round 340 (Div. 2) FINISHED False 7200 278259899 Jan. 23, 2016, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18092 ) B Chocolate PROGRAMMING combinatorics 1300

B"Bob loves everything sweet. His favorite chocolate bar consists of pieces, each piece may contain a nut. Bob wants to break the bar of chocolate into multiple pieces so that each part would contain exactly one nut and any break line goes between two adjacent pieces. You are asked to calculate the number of ways he can do it. Two ways to break chocolate are considered distinct if one of them contains a break between some two adjacent pieces and the other one doesn't. Please note, that if Bob doesn't make any breaks, all the bar will form one piece and it still has to have exactly one nut. The first line of the input contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of pieces in the chocolate bar. The second line contains n integers ai (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891), where 0 represents a piece without the nut and 1 stands for a piece with the nut. Print the number of ways to break the chocolate into multiple parts so that each part would contain exactly one nut. In the first sample there is exactly one nut, so the number of ways equals 1 -- Bob shouldn't make any breaks. In the second sample you can break the bar in four ways: 10|10|1 1|010|1 10|1|01 1|01|01"...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46158865 MAR97 B Nov. 24, 2018, 9:05 a.m. OK Clang++17 Diagnostics TESTS 26 46 0 1300
45474077 vjudge4 B Nov. 9, 2018, 11:35 a.m. OK Clang++17 Diagnostics TESTS 26 46 307200 1300
47800735 shubhamk_ojha B Dec. 31, 2018, 10:26 p.m. OK Clang++17 Diagnostics TESTS 26 46 4198400 1300
50467093 idealcoder B Feb. 24, 2019, 8:32 p.m. OK D TESTS 26 31 0 1300
48897277 binarmo B Jan. 24, 2019, 4:26 p.m. OK FPC TESTS 26 31 0 1300
47844278 NewbieMisis B Jan. 2, 2019, 1:49 p.m. OK FPC TESTS 26 31 0 1300
47355888 Kostin2020 B Dec. 22, 2018, 6:15 a.m. OK FPC TESTS 26 31 102400 1300
49055820 PhuongPeu B Jan. 27, 2019, 1:15 p.m. OK FPC TESTS 26 31 204800 1300
41332484 LeVanThuc B Aug. 8, 2018, 9:37 a.m. OK FPC TESTS 26 31 409600 1300
68714300 canhtoantpvp B Jan. 13, 2020, 1:57 p.m. OK FPC TESTS 26 31 1126400 1300
42145213 chaorenhaha B Aug. 27, 2018, 8:25 a.m. OK FPC TESTS 26 31 1638400 1300
42145201 chaorenhaha B Aug. 27, 2018, 8:25 a.m. OK FPC TESTS 26 31 1638400 1300
63291704 72nuaq B Oct. 24, 2019, 11:56 a.m. OK FPC TESTS 26 46 16076800 1300
38822255 apoorvbansal16 B June 1, 2018, 8:24 a.m. OK GNU C TESTS 26 15 3379200 1300
36676771 k_ankita B March 27, 2018, 6:33 p.m. OK GNU C TESTS 26 15 3584000 1300
37118940 Maaddy B April 9, 2018, 10:46 a.m. OK GNU C TESTS 26 30 3276800 1300
37603796 sayan1706 B April 25, 2018, 5:04 p.m. OK GNU C TESTS 26 31 3379200 1300
36694264 Fokhrul_Islam_Parvez B March 28, 2018, 1:35 p.m. OK GNU C TESTS 26 31 3584000 1300
38447304 thisisme123 B May 20, 2018, 4:45 a.m. OK GNU C++ TESTS 26 15 0 1300
39200687 manpower B June 12, 2018, 8:13 p.m. OK GNU C++ TESTS 26 15 0 1300
39161402 JeffreyLC B June 11, 2018, 2:38 p.m. OK GNU C++ TESTS 26 15 0 1300
38629986 vjudge2 B May 26, 2018, 9:34 a.m. OK GNU C++ TESTS 26 15 0 1300
38449497 Hlt B May 20, 2018, 6:30 a.m. OK GNU C++ TESTS 26 15 0 1300
36063673 AN_FBS_IK B March 8, 2018, 7:36 a.m. OK GNU C++ TESTS 26 15 2048000 1300
35723540 vjudge4 B Feb. 26, 2018, 7:44 a.m. OK GNU C++ TESTS 26 15 2048000 1300
35671955 vjudge2 B Feb. 25, 2018, 8:02 a.m. OK GNU C++ TESTS 26 15 2048000 1300
35671461 vjudge5 B Feb. 25, 2018, 7:42 a.m. OK GNU C++ TESTS 26 15 2048000 1300
35671308 vjudge5 B Feb. 25, 2018, 7:36 a.m. OK GNU C++ TESTS 26 15 2048000 1300
59913545 naro_ttam B Sept. 2, 2019, 6:11 p.m. OK GNU C11 TESTS 26 30 0 1300
49191702 UR_10 B Jan. 30, 2019, 8:30 a.m. OK GNU C11 TESTS 26 30 0 1300
46819534 Dhiru634 B Dec. 9, 2018, 2:20 p.m. OK GNU C11 TESTS 26 30 0 1300
62760367 HamdiNcir B Oct. 17, 2019, 6:38 a.m. OK GNU C11 TESTS 26 31 0 1300
49191637 UR_10 B Jan. 30, 2019, 8:29 a.m. OK GNU C11 TESTS 26 31 0 1300
51868024 RootPi B March 26, 2019, 4:05 p.m. OK GNU C11 TESTS 26 31 0 1300
53302031 jalalium B April 25, 2019, 9:41 p.m. OK GNU C11 TESTS 26 31 0 1300
57480105 vjudge2 B July 22, 2019, 1:51 a.m. OK GNU C11 TESTS 26 31 0 1300
60138701 kaiboy B Sept. 5, 2019, 7:13 p.m. OK GNU C11 TESTS 26 31 0 1300
61105237 FEILI B Sept. 23, 2019, 8:52 a.m. OK GNU C11 TESTS 26 31 0 1300
48975193 asdasde B Jan. 26, 2019, 9:15 a.m. OK GNU C++11 TESTS 26 15 0 1300
41957805 HiWorld01 B Aug. 22, 2018, 7:41 a.m. OK GNU C++11 TESTS 26 15 0 1300
52267193 vjudge5 B April 3, 2019, 11:49 a.m. OK GNU C++11 TESTS 26 15 0 1300
44826438 hackerman_from_google B Oct. 25, 2018, 6:19 a.m. OK GNU C++11 TESTS 26 15 0 1300
46549542 andrei_boaca B Dec. 3, 2018, 4:58 p.m. OK GNU C++11 TESTS 26 15 0 1300
38424083 alireza_kaviani B May 19, 2018, 8:52 a.m. OK GNU C++11 TESTS 26 15 307200 1300
38467994 harshitcode123 B May 20, 2018, 7:14 p.m. OK GNU C++11 TESTS 26 15 1638400 1300
36273436 abelm B March 14, 2018, 11:41 a.m. OK GNU C++11 TESTS 26 15 2048000 1300
36302896 attiw B March 15, 2018, 1:34 p.m. OK GNU C++11 TESTS 26 15 2048000 1300
36215094 partoptr B March 12, 2018, 4:56 a.m. OK GNU C++11 TESTS 26 15 2048000 1300
64704622 vjudge3 B Nov. 11, 2019, 3:59 p.m. OK GNU C++14 TESTS 26 15 0 1300
64704657 .s. B Nov. 11, 2019, 4 p.m. OK GNU C++14 TESTS 26 15 0 1300
64743486 Karamany2 B Nov. 12, 2019, 12:46 p.m. OK GNU C++14 TESTS 26 15 0 1300
66254447 thegp B Dec. 4, 2019, 5:01 a.m. OK GNU C++14 TESTS 26 15 0 1300
66343072 pratiikgoogler B Dec. 5, 2019, 3:38 p.m. OK GNU C++14 TESTS 26 15 0 1300
66823545 __shrey__111 B Dec. 14, 2019, 8:12 a.m. OK GNU C++14 TESTS 26 15 0 1300
68077453 ivatopuria B Jan. 2, 2020, 1:08 p.m. OK GNU C++14 TESTS 26 15 0 1300
68588159 Alex.exe B Jan. 11, 2020, 11:54 a.m. OK GNU C++14 TESTS 26 15 0 1300
69663476 ritikgupta0912 B Jan. 28, 2020, 10:23 a.m. OK GNU C++14 TESTS 26 15 0 1300
69683927 bhav_esh B Jan. 28, 2020, 4:27 p.m. OK GNU C++14 TESTS 26 15 0 1300
69961218 _AME_01_ B Feb. 1, 2020, 11:31 a.m. OK GNU C++17 TESTS 26 15 0 1300
69875968 Tareq_Ali B Jan. 31, 2020, 4:02 a.m. OK GNU C++17 TESTS 26 15 0 1300
69383548 _irLIri_ B Jan. 22, 2020, 8:48 p.m. OK GNU C++17 TESTS 26 15 0 1300
68411782 NumberFreak B Jan. 8, 2020, 5:17 p.m. OK GNU C++17 TESTS 26 15 0 1300
68077686 BelGuTei.B B Jan. 2, 2020, 1:13 p.m. OK GNU C++17 TESTS 26 15 0 1300
68064996 izcode_123456 B Jan. 2, 2020, 7:11 a.m. OK GNU C++17 TESTS 26 15 0 1300
67767969 spike1236 B Dec. 28, 2019, 5:18 a.m. OK GNU C++17 TESTS 26 15 0 1300
67665048 jogarao B Dec. 26, 2019, 5:29 p.m. OK GNU C++17 TESTS 26 15 0 1300
67564502 vko92023bcaoocom B Dec. 24, 2019, 6:42 p.m. OK GNU C++17 TESTS 26 15 0 1300
66229744 talant110726 B Dec. 3, 2019, 1:56 p.m. OK GNU C++17 TESTS 26 15 0 1300
51039759 fayzzz B March 8, 2019, 4:32 p.m. OK Go TESTS 26 46 0 1300
64573368 Petrosz B Nov. 9, 2019, 9:58 a.m. OK Haskell TESTS 26 15 102400 1300
68336650 lifeiteng B Jan. 6, 2020, 10:39 p.m. OK Java 11 TESTS 26 171 0 1300
69387016 dipankar12 B Jan. 22, 2020, 11:48 p.m. OK Java 8 TESTS 26 93 0 1300
46019990 paperlesscat B Nov. 21, 2018, 7:17 a.m. OK Java 8 TESTS 26 108 0 1300
64330592 less_than_gray B Nov. 5, 2019, 7:08 p.m. OK Java 8 TESTS 26 108 0 1300
64300003 an09mous B Nov. 5, 2019, 9:44 a.m. OK Java 8 TESTS 26 108 0 1300
60841418 Hamza_Hassan B Sept. 19, 2019, 11:06 a.m. OK Java 8 TESTS 26 108 0 1300
56311282 insane_28 B June 30, 2019, 2:48 p.m. OK Java 8 TESTS 26 108 0 1300
61179992 ankyy_0103 B Sept. 23, 2019, 7:27 p.m. OK Java 8 TESTS 26 109 0 1300
64275869 GiantTornado B Nov. 4, 2019, 9:22 p.m. OK Java 8 TESTS 26 109 0 1300
68145658 AnandOza B Jan. 4, 2020, 4:11 a.m. OK Java 8 TESTS 26 109 0 1300
64734075 Mackenzie B Nov. 12, 2019, 9:31 a.m. OK Java 8 TESTS 26 109 0 1300
43706276 montacir B Oct. 2, 2018, 10:01 p.m. OK JavaScript TESTS 26 31 0 1300
40200591 re3 B July 11, 2018, 12:20 p.m. OK JavaScript TESTS 26 31 1024000 1300
50680524 cyansea B March 2, 2019, 11:16 a.m. OK Kotlin TESTS 26 140 102400 1300
39025126 ymrg3307 B June 7, 2018, 3:03 p.m. OK Mono C# TESTS 26 31 0 1300
68457636 speed439 B Jan. 9, 2020, 4:51 p.m. OK Mono C# TESTS 26 46 0 1300
40549018 AbdelrhmanElashmony B July 19, 2018, 1:18 p.m. OK Mono C# TESTS 26 46 0 1300
40512122 Skndr801 B July 18, 2018, 11:36 a.m. OK Mono C# TESTS 26 46 0 1300
38980399 Acrode B June 5, 2018, 11:22 p.m. OK Mono C# TESTS 26 46 0 1300
58925120 amit1509kumar B Aug. 16, 2019, 7:03 p.m. OK Mono C# TESTS 26 62 0 1300
43720728 nemars B Oct. 3, 2018, 9:50 a.m. OK Mono C# TESTS 26 62 3584000 1300
40207161 re3 B July 11, 2018, 4:21 p.m. OK Mono C# TESTS 26 62 3584000 1300
63392123 boookva B Oct. 25, 2019, 3:34 p.m. OK Mono C# TESTS 26 62 3584000 1300
48933536 sevimlikedicik B Jan. 25, 2019, 1:17 p.m. OK Mono C# TESTS 26 78 3584000 1300
41922675 Icarus0 B Aug. 21, 2018, 5:37 a.m. OK MS C++ TESTS 26 15 0 1300
42450686 shiyan12 B Sept. 4, 2018, 7:49 a.m. OK MS C++ TESTS 26 15 307200 1300
35559961 Al-King-Za B Feb. 21, 2018, 9:17 p.m. OK MS C++ TESTS 26 15 2048000 1300
35324082 AhmadJamal B Feb. 16, 2018, 1:08 a.m. OK MS C++ TESTS 26 15 2048000 1300
35358964 Amr-shbeeb B Feb. 16, 2018, 4:12 p.m. OK MS C++ TESTS 26 15 2048000 1300
35738838 shiyan12 B Feb. 26, 2018, 4:40 p.m. OK MS C++ TESTS 26 15 2150400 1300
35539077 Al-King-Za B Feb. 21, 2018, 6:12 a.m. OK MS C++ TESTS 26 15 2150400 1300
35725356 darthVader1010 B Feb. 26, 2018, 8:51 a.m. OK MS C++ TESTS 26 15 2150400 1300
35738814 kubsu B Feb. 26, 2018, 4:39 p.m. OK MS C++ TESTS 26 15 2150400 1300
35738825 shiyan12 B Feb. 26, 2018, 4:39 p.m. OK MS C++ TESTS 26 15 2150400 1300
57713518 vjudge3 B July 25, 2019, 1:32 a.m. OK MS C++ 2017 TESTS 26 30 0 1300
61739064 poormate B Oct. 2, 2019, 7:22 p.m. OK MS C++ 2017 TESTS 26 31 0 1300
62620497 ahmedo42 B Oct. 15, 2019, 12:43 p.m. OK MS C++ 2017 TESTS 26 31 0 1300
58342923 bahaaEldeen B Aug. 5, 2019, 1:51 p.m. OK MS C++ 2017 TESTS 26 31 0 1300
58190740 KATAYPEPE B Aug. 2, 2019, 7:28 p.m. OK MS C++ 2017 TESTS 26 31 0 1300
57238839 mohamedsayedaziz B July 17, 2019, 4:34 p.m. OK MS C++ 2017 TESTS 26 31 0 1300
57186522 vjudge3 B July 17, 2019, 8:52 a.m. OK MS C++ 2017 TESTS 26 31 0 1300
57167506 vjudge1 B July 17, 2019, 12:38 a.m. OK MS C++ 2017 TESTS 26 31 0 1300
55703559 r.y B June 18, 2019, 6:19 a.m. OK MS C++ 2017 TESTS 26 31 0 1300
49860363 Koya_Seth B Feb. 13, 2019, 9:11 a.m. OK MS C++ 2017 TESTS 26 31 0 1300
40229073 re3 B July 12, 2018, 10:50 a.m. OK PHP TESTS 26 46 0 1300
52993870 vjudge3 B April 19, 2019, 1:51 a.m. OK PyPy 2 TESTS 26 124 0 1300
69697023 raj1307 B Jan. 28, 2020, 9:02 p.m. OK PyPy 2 TESTS 26 139 307200 1300
63038097 PS41 B Oct. 20, 2019, 10:04 p.m. OK PyPy 3 TESTS 26 124 0 1300
53125934 iamprayush B April 22, 2019, 2:01 p.m. OK PyPy 3 TESTS 26 124 0 1300
53109486 wesley_monte B April 22, 2019, 12:12 a.m. OK PyPy 3 TESTS 26 124 0 1300
47308249 nthoang B Dec. 20, 2018, 6:04 p.m. OK PyPy 3 TESTS 26 124 0 1300
44771444 meparthaprotim B Oct. 24, 2018, 12:33 p.m. OK PyPy 3 TESTS 26 124 0 1300
64668662 rodrigods B Nov. 11, 2019, 4:23 a.m. OK PyPy 3 TESTS 26 140 0 1300
64329491 smoke_bellew B Nov. 5, 2019, 6:41 p.m. OK PyPy 3 TESTS 26 140 0 1300
63876169 mbolgov B Oct. 30, 2019, 7:04 p.m. OK PyPy 3 TESTS 26 140 0 1300
63091370 scheduler B Oct. 21, 2019, 6:36 p.m. OK PyPy 3 TESTS 26 140 0 1300
60584498 Mr.N_Nabhani B Sept. 14, 2019, 8:15 p.m. OK PyPy 3 TESTS 26 140 0 1300
36262549 daniboyrc B March 13, 2018, 11:55 p.m. OK Python 2 TESTS 26 62 4608000 1300
38350934 bsr011 B May 17, 2018, 1:45 p.m. OK Python 2 TESTS 26 124 0 1300
38756084 franckmy B May 30, 2018, 1:52 a.m. OK Python 2 TESTS 26 124 6041600 1300
53123126 vjudge5 B April 22, 2019, 12:27 p.m. OK Python 2 TESTS 26 156 0 1300
53207114 vjudge5 B April 23, 2019, 11:52 p.m. OK Python 2 TESTS 26 170 0 1300
60284417 vjudge5 B Sept. 9, 2019, 12:42 a.m. OK Python 2 TESTS 26 171 0 1300
55311130 vjudge2 B June 8, 2019, 5:41 p.m. OK Python 2 TESTS 26 171 0 1300
53709178 vjudge4 B May 3, 2019, 2:42 p.m. OK Python 2 TESTS 26 171 0 1300
53209392 gabxx7 B April 24, 2019, 3:19 a.m. OK Python 2 TESTS 26 171 0 1300
53123093 antunesdantass B April 22, 2019, 12:26 p.m. OK Python 2 TESTS 26 171 0 1300
36146424 rareone0602 B March 10, 2018, 10:05 a.m. OK Python 3 TESTS 26 62 5632000 1300
36145674 petiteteaparty B March 10, 2018, 9:36 a.m. OK Python 3 TESTS 26 62 5632000 1300
35461159 Damonfeuer777 B Feb. 19, 2018, 3:37 a.m. OK Python 3 TESTS 26 62 5632000 1300
35337927 LuckT B Feb. 16, 2018, 1:06 p.m. OK Python 3 TESTS 26 62 5632000 1300
36942784 Cyandre B April 4, 2018, 7:43 a.m. OK Python 3 TESTS 26 78 7065600 1300
36637197 sergovoy B March 26, 2018, 9:34 a.m. OK Python 3 TESTS 26 78 7372800 1300
37118825 Maaddy B April 9, 2018, 10:41 a.m. OK Python 3 TESTS 26 92 7065600 1300
36903515 Incognito B April 3, 2018, 1:20 p.m. OK Python 3 TESTS 26 92 7065600 1300
36351432 saazaad000 B March 17, 2018, 10:53 a.m. OK Python 3 TESTS 26 92 7065600 1300
37839613 abrunoaa B May 2, 2018, 12:21 p.m. OK Python 3 TESTS 26 93 7065600 1300
35895919 ______u______ B March 3, 2018, 4:57 p.m. OK Ruby TESTS 26 62 6451200 1300
35887986 ______h______ B March 3, 2018, 2:13 p.m. OK Ruby TESTS 26 62 6451200 1300
35887545 ______k______ B March 3, 2018, 2:06 p.m. OK Ruby TESTS 26 62 6451200 1300
35886597 ______i______ B March 3, 2018, 1:50 p.m. OK Ruby TESTS 26 62 6451200 1300
35884709 ______M______ B March 3, 2018, 1:15 p.m. OK Ruby TESTS 26 62 6451200 1300
41548843 dedok19971 B Aug. 13, 2018, 7:05 a.m. OK Scala TESTS 26 530 0 1300

remove filters

Back to search problems