Codeforces Beta Round 97 (Div. 1)

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
135 Codeforces Beta Round 97 (Div. 1) FINISHED False 7200 414514451 Dec. 9, 2011, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1356 ) C Zero-One PROGRAMMING constructive algorithms games greedy 2000

B'Little Petya very much likes playing with little Masha. Recently he has received a game called "Zero-One" as a gift from his mother. Petya immediately offered Masha to play the game with him. Before the very beginning of the game several cards are lain out on a table in one line from the left to the right. Each card contains a digit: 0 or 1. Players move in turns and Masha moves first. During each move a player should remove a card from the table and shift all other cards so as to close the gap left by the removed card. For example, if before somebody 's move the cards on the table formed a sequence 01010101, then after the fourth card is removed (the cards are numbered starting from 1), the sequence will look like that: 0100101. The game ends when exactly two cards are left on the table. The digits on these cards determine the number in binary notation: the most significant bit is located to the left. Masha 's aim is to minimize the number and Petya 's aim is to maximize it. An unpleasant accident occurred before the game started. The kids spilled juice on some of the cards and the digits on the cards got blurred. Each one of the spoiled cards could have either 0 or 1 written on it. Consider all possible variants of initial arrangement of the digits (before the juice spilling). For each variant, let 's find which two cards are left by the end of the game, assuming that both Petya and Masha play optimally. An ordered pair of digits written on those two cards is called an outcome. Your task is to find the set of outcomes for all variants of initial digits arrangement. The first line contains a sequence of characters each of which can either be a "0", a "1" or a "?". This sequence determines the initial arrangement of cards on the table from the left to the right. The characters "?" mean that the given card was spoiled before the game. The sequence 's length ranges from 2 to 105, inclusive. Print the set of outcomes for all possible initial digits arrangements. '...

Tutorials

Codeforces Beta Round #97: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
948548 urbilya C Dec. 10, 2011, 5:18 a.m. OK Delphi TESTS 110 50 1126400 2000
948488 kord C Dec. 10, 2011, 4:57 a.m. OK Delphi TESTS 110 50 1126400 2000
1218666 bidzilya C Feb. 23, 2012, 6:50 a.m. OK Delphi TESTS 110 50 1126400 2000
1810388 AleksanderBalobanov C June 19, 2012, 2:27 p.m. OK Delphi TESTS 110 50 9728000 2000
1810394 AleksanderBalobanov C June 19, 2012, 2:31 p.m. OK Delphi TESTS 110 50 9728000 2000
947561 Depool C Dec. 9, 2011, 10:22 p.m. OK Delphi TESTS 110 60 1126400 2000
2087308 woshishui--- C Sept. 1, 2012, 11:48 a.m. OK FPC TESTS 110 30 921600 2000
1765507 whitetooth C June 5, 2012, 9:17 a.m. OK FPC TESTS 110 30 1228800 2000
944092 superpear C Dec. 9, 2011, 4:17 p.m. OK FPC TESTS 110 30 1331200 2000
1314694 object022 C March 9, 2012, 7:23 a.m. OK FPC TESTS 110 30 1331200 2000
1766316 scorpion C June 5, 2012, 4:49 p.m. OK FPC TESTS 110 30 1433600 2000
3016666 Alex_2oo8 C Jan. 27, 2013, 2:43 p.m. OK FPC TESTS 110 31 307200 2000
953726 alexSkuralov C Dec. 13, 2011, 8:27 a.m. OK FPC TESTS 110 50 1024000 2000
947969 zanoes C Dec. 10, 2011, 1:35 a.m. OK FPC TESTS 110 50 1228800 2000
945514 Rubanenko C Dec. 9, 2011, 4:42 p.m. OK FPC TESTS 110 50 1228800 2000
1664585 vlad107 C May 5, 2012, 3:29 p.m. OK FPC TESTS 110 50 1331200 2000
27666563 srijansingh C June 8, 2017, 8:23 a.m. OK GNU C TESTS 110 30 204800 2000
1351938 goxrush C March 12, 2012, 1:39 p.m. OK GNU C TESTS 110 30 1433600 2000
1351933 goxrush C March 12, 2012, 1:38 p.m. OK GNU C TESTS 110 30 1433600 2000
943916 kawatea C Dec. 9, 2011, 4:14 p.m. OK GNU C TESTS 110 30 1433600 2000
1964906 vjudge2 C July 31, 2012, 12:09 p.m. OK GNU C TESTS 110 30 1536000 2000
941001 LayCurse C Dec. 9, 2011, 3:35 p.m. OK GNU C TESTS 110 30 1536000 2000
3470818 _Vadim_ C April 3, 2013, 9:13 p.m. OK GNU C++ TESTS 110 15 0 2000
4037931 chanming C July 8, 2013, 9:03 a.m. OK GNU C++ TESTS 110 15 102400 2000
3272988 sa1g2 C March 10, 2013, 9:05 a.m. OK GNU C++ TESTS 110 15 102400 2000
3224839 vjudge5 C March 1, 2013, 12:29 p.m. OK GNU C++ TESTS 110 15 102400 2000
3224557 Mabraygas C March 1, 2013, 12:26 p.m. OK GNU C++ TESTS 110 15 102400 2000
3199494 FreezingCool C Feb. 26, 2013, 3:38 p.m. OK GNU C++ TESTS 110 15 102400 2000
3171307 hlwt C Feb. 22, 2013, 8:35 a.m. OK GNU C++ TESTS 110 15 102400 2000
3073428 vjudge5 C Feb. 5, 2013, 6:44 a.m. OK GNU C++ TESTS 110 15 102400 2000
3073366 vjudge4 C Feb. 5, 2013, 6:26 a.m. OK GNU C++ TESTS 110 15 102400 2000
3073363 vjudge5 C Feb. 5, 2013, 6:25 a.m. OK GNU C++ TESTS 110 15 102400 2000
972228 Archon.JK C Dec. 22, 2011, 11:52 p.m. OK GNU C++0x TESTS 110 30 1433600 2000
943039 Archon.JK C Dec. 9, 2011, 4 p.m. OK GNU C++0x TESTS 110 30 1433600 2000
945916 kinodjnz C Dec. 9, 2011, 4:49 p.m. OK GNU C++0x TESTS 110 30 1536000 2000
1046503 stan C Jan. 15, 2012, 12:32 p.m. OK GNU C++0x TESTS 110 30 1638400 2000
941792 watashi C Dec. 9, 2011, 3:44 p.m. OK GNU C++0x TESTS 110 30 2457600 2000
2491788 wzc1995 C Nov. 2, 2012, 2:49 p.m. OK GNU C++0x TESTS 110 31 102400 2000
2491780 wzc1995 C Nov. 2, 2012, 2:46 p.m. OK GNU C++0x TESTS 110 31 102400 2000
2489469 lydrainbowcat xlk PianoEater whd wanghd sjynoi wzc1995 Hello_World Kujou_Karen lagoon0o0 Tune CatCat wccy C Nov. 2, 2012, 7:05 a.m. OK GNU C++0x TESTS 110 46 1024000 2000
950765 siuvit C Dec. 11, 2011, 1:08 a.m. OK GNU C++0x TESTS 110 50 1536000 2000
943221 sexyprincess91 C Dec. 9, 2011, 4:03 p.m. OK GNU C++0x TESTS 110 50 1638400 2000
58971589 rainboy C Aug. 17, 2019, 8:46 p.m. OK GNU C11 TESTS 110 62 102400 2000
14257719 trabbbart C Nov. 14, 2015, 4:09 p.m. OK GNU C++11 TESTS 110 30 0 2000
20780912 ggh93234999 C Sept. 20, 2016, 4:42 p.m. OK GNU C++11 TESTS 110 30 0 2000
18635345 noor148 C June 21, 2016, 6:58 p.m. OK GNU C++11 TESTS 110 30 102400 2000
15588572 andrew.volchek C Jan. 26, 2016, 7:39 a.m. OK GNU C++11 TESTS 110 30 102400 2000
27822065 423555290 C June 16, 2017, 9:55 a.m. OK GNU C++11 TESTS 110 30 102400 2000
21917520 mainstring C Oct. 31, 2016, 12:52 p.m. OK GNU C++11 TESTS 110 30 204800 2000
15227651 radoslav11 C Jan. 7, 2016, 4:49 p.m. OK GNU C++11 TESTS 110 30 307200 2000
14429636 YusufHussein C Nov. 23, 2015, 4:19 p.m. OK GNU C++11 TESTS 110 30 307200 2000
27303601 Cache C May 23, 2017, 2:50 p.m. OK GNU C++11 TESTS 110 30 307200 2000
16321786 gauravbansal20 C Feb. 25, 2016, 7:05 a.m. OK GNU C++11 TESTS 110 30 409600 2000
21243555 Motarack C Oct. 6, 2016, 6:39 p.m. OK GNU C++14 TESTS 110 30 102400 2000
27014772 ruhan.habib39 C May 11, 2017, 1:56 p.m. OK GNU C++14 TESTS 110 30 102400 2000
32311377 smu201111192 C Nov. 14, 2017, 12:34 p.m. OK GNU C++14 TESTS 110 30 307200 2000
31182125 blue__legend C Oct. 10, 2017, 6:15 a.m. OK GNU C++14 TESTS 110 30 307200 2000
32320379 pce913 C Nov. 14, 2017, 9:03 p.m. OK GNU C++14 TESTS 110 30 307200 2000
33820156 Phoenix1369 C Dec. 30, 2017, 8:26 p.m. OK GNU C++14 TESTS 110 30 1945600 2000
34156015 Md._Abu_Nafee_Ibna_Zahid C Jan. 13, 2018, 4:27 p.m. OK GNU C++14 TESTS 110 30 2048000 2000
26182954 ngfam C April 7, 2017, 2:49 a.m. OK GNU C++14 TESTS 110 30 2048000 2000
35773807 wewark C Feb. 27, 2018, 7:52 p.m. OK GNU C++14 TESTS 110 30 2150400 2000
34101816 murugappan_s C Jan. 12, 2018, 8:37 a.m. OK GNU C++14 TESTS 110 30 2150400 2000
39205700 cai_lw C June 13, 2018, 4:05 a.m. OK GNU C++17 TESTS 110 62 102400 2000
68360328 kostia244 C Jan. 7, 2020, 1:51 p.m. OK GNU C++17 TESTS 110 62 307200 2000
67659886 299iq C Dec. 26, 2019, 3:22 p.m. OK GNU C++17 TESTS 110 62 307200 2000
66479172 Anji C Dec. 7, 2019, 11:52 p.m. OK GNU C++17 TESTS 110 62 307200 2000
65112139 HadyKo C Nov. 15, 2019, 11:49 p.m. OK GNU C++17 TESTS 110 62 307200 2000
64176346 dorijanlendvaj C Nov. 3, 2019, 9:06 p.m. OK GNU C++17 TESTS 110 62 307200 2000
63634032 SYury C Oct. 28, 2019, 7:30 a.m. OK GNU C++17 TESTS 110 62 307200 2000
62177307 sherri_ice C Oct. 9, 2019, 4:50 a.m. OK GNU C++17 TESTS 110 62 307200 2000
59893403 wsxedcrfv C Sept. 2, 2019, 11:15 a.m. OK GNU C++17 TESTS 110 62 307200 2000
58952519 shubham732 C Aug. 17, 2019, 11:34 a.m. OK GNU C++17 TESTS 110 62 307200 2000
963524 Ahmed_Salama C Dec. 16, 2011, 2:02 p.m. OK Java 6 TESTS 110 90 43110400 2000
2435491 Kornacker C Oct. 25, 2012, 10:18 p.m. OK Java 6 TESTS 110 93 0 2000
2562197 Azat_Yusupov C Nov. 15, 2012, 8:53 a.m. OK Java 6 TESTS 110 109 307200 2000
953670 chronotable C Dec. 13, 2011, 7:39 a.m. OK Java 6 TESTS 110 110 43110400 2000
941392 yaro C Dec. 9, 2011, 3:39 p.m. OK Java 6 TESTS 110 110 43212800 2000
948975 stevenkplus C Dec. 10, 2011, 7:39 a.m. OK Java 6 TESTS 110 130 43110400 2000
951926 islam-al-aarag C Dec. 11, 2011, 5:33 p.m. OK Java 6 TESTS 110 130 43110400 2000
943882 uwi C Dec. 9, 2011, 4:14 p.m. OK Java 6 TESTS 110 130 43212800 2000
1131230 mostafa_fahim C Feb. 1, 2012, 5:26 p.m. OK Java 6 TESTS 110 130 43212800 2000
941568 Egor C Dec. 9, 2011, 3:41 p.m. OK Java 6 TESTS 110 130 43212800 2000
12550953 alibaba C Aug. 15, 2015, 5:46 p.m. OK Java 7 TESTS 110 156 0 2000
55957452 spar5h C June 23, 2019, 7:53 a.m. OK Java 8 TESTS 110 248 0 2000
17012028 kon0x C March 29, 2016, 12:03 a.m. OK Java 8 TESTS 110 248 20889600 2000
16934170 Sumeet.Varma C March 25, 2016, 4:53 p.m. OK Java 8 TESTS 110 278 20480000 2000
39215630 bluesky111 C June 13, 2018, 12:04 p.m. OK Java 8 TESTS 110 280 0 2000
39541670 amnesiac_dusk C June 23, 2018, 12:43 p.m. OK Java 8 TESTS 110 280 0 2000
14090562 PalmZE C Nov. 5, 2015, 2:14 p.m. OK Java 8 TESTS 110 280 0 2000
9369634 AlexFetisov C Jan. 6, 2015, 4:38 a.m. OK Java 8 TESTS 110 280 0 2000
26791032 Kammola C May 1, 2017, 7:07 p.m. OK Java 8 TESTS 110 280 20582400 2000
58971590 Dukkha C Aug. 17, 2019, 8:46 p.m. OK Java 8 TESTS 110 310 0 2000
31968975 __N__ C Nov. 2, 2017, 5:52 a.m. OK Java 8 TESTS 110 310 0 2000
943756 zaq1xsw2tktk C Dec. 9, 2011, 4:11 p.m. OK Mono C# TESTS 110 130 10649600 2000
944826 chokudai C Dec. 9, 2011, 4:30 p.m. OK Mono C# TESTS 110 140 10752000 2000
3073190 vjudge4 C Feb. 5, 2013, 5:36 a.m. OK MS C++ TESTS 110 15 204800 2000
948490 KID. C Dec. 10, 2011, 4:58 a.m. OK MS C++ TESTS 110 30 1536000 2000
1446754 vjudge4 C March 31, 2012, 1:03 p.m. OK MS C++ TESTS 110 30 1536000 2000
1361277 Noskov C March 16, 2012, 1:34 p.m. OK MS C++ TESTS 110 30 1536000 2000
957221 J_M C Dec. 16, 2011, 4:32 a.m. OK MS C++ TESTS 110 30 1536000 2000
948652 KID. C Dec. 10, 2011, 5:53 a.m. OK MS C++ TESTS 110 30 1536000 2000
948525 BIT_silence C Dec. 10, 2011, 5:11 a.m. OK MS C++ TESTS 110 30 1536000 2000
948434 zjut_DD C Dec. 10, 2011, 4:35 a.m. OK MS C++ TESTS 110 30 1536000 2000
946832 Anarivu C Dec. 9, 2011, 5:03 p.m. OK MS C++ TESTS 110 30 1536000 2000
946763 zjut_DD C Dec. 9, 2011, 5:02 p.m. OK MS C++ TESTS 110 30 1536000 2000
947614 alexey.shchepin C Dec. 9, 2011, 10:39 p.m. OK Ocaml TESTS 110 130 2252800 2000
957312 alexey.shchepin C Dec. 16, 2011, 5:49 a.m. OK Ocaml TESTS 110 420 2764800 2000
46133703 cgfs10000 C Nov. 24, 2018, 4 a.m. OK PyPy 3 TESTS 110 310 5120000 2000
1259167 nab C March 3, 2012, 5:31 a.m. OK Python 2 TESTS 110 60 3072000 2000
3087194 nealzane C Feb. 9, 2013, 4:07 p.m. OK Python 2 TESTS 110 62 204800 2000
953003 Thomas_Ahle C Dec. 12, 2011, 2:48 p.m. OK Python 2 TESTS 110 80 3072000 2000
951904 TempuX C Dec. 11, 2011, 5:09 p.m. OK Python 2 TESTS 110 80 3072000 2000
35838784 ______n______ C March 2, 2018, 1:40 p.m. OK Python 2 TESTS 110 124 4812800 2000
35838783 ______u______ C March 2, 2018, 1:40 p.m. OK Python 2 TESTS 110 124 4812800 2000
35838684 _____i_____ C March 2, 2018, 1:38 p.m. OK Python 2 TESTS 110 124 4812800 2000
35838676 _____k_____ C March 2, 2018, 1:38 p.m. OK Python 2 TESTS 110 124 4812800 2000
35834227 ______h______ C March 2, 2018, 11:58 a.m. OK Python 2 TESTS 110 124 4812800 2000
35834218 ______k______ C March 2, 2018, 11:58 a.m. OK Python 2 TESTS 110 124 4812800 2000
3962251 alculquicondor C June 26, 2013, 3:40 a.m. OK Python 3 TESTS 110 156 307200 2000
65244199 JacksonGoerner C Nov. 17, 2019, 9:46 a.m. OK Python 3 TESTS 110 248 204800 2000
43638788 lckcode C Oct. 1, 2018, 10:09 a.m. OK Python 3 TESTS 110 248 204800 2000
49392802 pavkal5 C Feb. 3, 2019, 10:55 a.m. OK Python 3 TESTS 110 280 204800 2000
40506825 YashVSingh C July 18, 2018, 8:53 a.m. OK Python 3 TESTS 110 310 204800 2000
42134471 Mk_Python_v1 C Aug. 26, 2018, 9:51 p.m. OK Python 3 TESTS 110 342 204800 2000
952778 K_operafan C Dec. 12, 2011, 12:06 p.m. OK Ruby TESTS 110 190 3788800 2000
948511 Kaguya C Dec. 10, 2011, 5:05 a.m. OK Ruby TESTS 110 270 3993600 2000

remove filters

Back to search problems