Codeforces Beta Round 96 (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
132 Codeforces Beta Round 96 (Div. 1) FINISHED False 7200 408898799 Dec. 3, 2011, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 618 ) D Constants in the language of Shakespeare PROGRAMMING constructive algorithms dp greedy 2100

B'Shakespeare is a widely known esoteric programming language in which programs look like plays by Shakespeare, and numbers are given by combinations of ornate epithets. In this problem we will have a closer look at the way the numbers are described in Shakespeare. Each constant in Shakespeare is created from non-negative powers of 2 using arithmetic operations. For simplicity we 'll allow only addition and subtraction and will look for a representation of the given number which requires a minimal number of operations. You are given an integer n. You have to represent it as n xe2 x80 x89= xe2 x80 x89a1 xe2 x80 x89+ xe2 x80 x89a2 xe2 x80 x89+ xe2 x80 x89... xe2 x80 x89+ xe2 x80 x89am, where each of ai is a non-negative power of 2, possibly multiplied by -1. Find a representation which minimizes the value of m. The only line of input contains a positive integer n, written as its binary notation. The length of the notation is at most 106. The first digit of the notation is guaranteed to be 1. Output the required minimal m. After it output m lines. Each line has to be formatted as "+2^x" or "-2^x", where x is the power coefficient of the corresponding term. The order of the lines doesn 't matter.'...

Tutorials

Codeforces Beta Round #96: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3254192 AleksanderBalobanov D March 5, 2013, 12:23 p.m. OK Delphi TESTS 61 1203 26112000 2100
1311650 object022 D March 8, 2012, 10:06 a.m. OK FPC TESTS 61 90 11366400 2100
927687 giongto35 D Dec. 3, 2011, 7:31 p.m. OK FPC TESTS 61 110 10342400 2100
1098610 vlad107 D Jan. 21, 2012, 7:47 a.m. OK FPC TESTS 61 110 22528000 2100
933147 Furko D Dec. 6, 2011, 2:15 p.m. OK FPC TESTS 61 130 10342400 2100
931363 suanrong D Dec. 5, 2011, 2:22 p.m. OK FPC TESTS 61 130 22425600 2100
932144 zncanke D Dec. 6, 2011, 1:26 a.m. OK FPC TESTS 61 130 32460800 2100
936743 waterkid D Dec. 9, 2011, 7:21 a.m. OK FPC TESTS 61 140 6348800 2100
935215 Oryshych D Dec. 8, 2011, 6:31 a.m. OK FPC TESTS 61 140 10342400 2100
926209 coolinging D Dec. 3, 2011, 4:50 p.m. OK FPC TESTS 61 140 22425600 2100
1354672 sillycross D March 13, 2012, 12:12 p.m. OK FPC TESTS 61 160 6041600 2100
923402 LayCurse D Dec. 3, 2011, 3:51 p.m. OK GNU C TESTS 61 220 11264000 2100
925046 -.- D Dec. 3, 2011, 4:26 p.m. OK GNU C TESTS 61 230 10444800 2100
3724492 vjudge2 D May 15, 2013, 5:36 p.m. OK GNU C TESTS 61 234 9420800 2100
5960360 tworuler D March 8, 2014, 3:13 a.m. OK GNU C++ TESTS 61 93 14950400 2100
5997486 vjudge1 D March 11, 2014, 3:46 p.m. OK GNU C++ TESTS 61 155 19353600 2100
14058092 vjudge5 D Nov. 4, 2015, 1:21 p.m. OK GNU C++ TESTS 61 156 4096000 2100
14183372 130705009 D Nov. 10, 2015, 11:31 a.m. OK GNU C++ TESTS 61 156 4812800 2100
5997489 vjudge3 D March 11, 2014, 3:47 p.m. OK GNU C++ TESTS 61 156 19353600 2100
5961978 theBlindMonk D March 8, 2014, 10:43 a.m. OK GNU C++ TESTS 61 156 19353600 2100
13001850 sxczf D Sept. 15, 2015, 12:52 a.m. OK GNU C++ TESTS 61 171 4812800 2100
9244983 osmanorhan D Dec. 24, 2014, 3:51 p.m. OK GNU C++ TESTS 61 171 5017600 2100
17530257 vjudge4 D April 27, 2016, 2:59 a.m. OK GNU C++ TESTS 61 171 7065600 2100
12892425 Altria-PenDragon D Sept. 8, 2015, 5:15 a.m. OK GNU C++ TESTS 61 171 7680000 2100
8877414 SealView D Nov. 28, 2014, 9:58 a.m. OK GNU C++0x TESTS 61 140 15360000 2100
8466927 akaiNeko paulwang eddy1021 D Oct. 29, 2014, 8:43 a.m. OK GNU C++0x TESTS 61 171 5017600 2100
2016524 july D Aug. 15, 2012, 11:42 a.m. OK GNU C++0x TESTS 61 230 5734400 2100
984483 Archon.JK D Dec. 25, 2011, 3:23 a.m. OK GNU C++0x TESTS 61 230 12390400 2100
9425707 sdya D Jan. 13, 2015, 7:34 p.m. OK GNU C++0x TESTS 61 233 7987200 2100
932311 package.zaic D Dec. 6, 2011, 4:49 a.m. OK GNU C++0x TESTS 61 250 7065600 2100
929000 xiaoshua D Dec. 4, 2011, 8:24 a.m. OK GNU C++0x TESTS 61 250 16076800 2100
923946 watashi D Dec. 3, 2011, 4:02 p.m. OK GNU C++0x TESTS 61 270 8806400 2100
928997 xiaoshua D Dec. 4, 2011, 8:23 a.m. OK GNU C++0x TESTS 61 270 119091200 2100
928639 lyoz D Dec. 4, 2011, 5:12 a.m. OK GNU C++0x TESTS 61 280 6451200 2100
59061007 rainboy D Aug. 18, 2019, 9:42 p.m. OK GNU C11 TESTS 61 1731 9011200 2100
57903393 lopare D July 28, 2019, 4:36 p.m. OK GNU C++11 TESTS 61 155 10854400 2100
52767788 xielinhan D April 15, 2019, 5:52 a.m. OK GNU C++11 TESTS 61 155 17817600 2100
45857626 zd11024 D Nov. 17, 2018, 3:12 a.m. OK GNU C++11 TESTS 61 155 19353600 2100
14646780 vjudge2 D Dec. 4, 2015, 11:36 a.m. OK GNU C++11 TESTS 61 156 4812800 2100
35838753 ______u______ D March 2, 2018, 1:40 p.m. OK GNU C++11 TESTS 61 156 13004800 2100
35838653 _____i_____ D March 2, 2018, 1:38 p.m. OK GNU C++11 TESTS 61 156 13004800 2100
35838649 _____k_____ D March 2, 2018, 1:38 p.m. OK GNU C++11 TESTS 61 156 13004800 2100
35833241 ______k______ D March 2, 2018, 11:10 a.m. OK GNU C++11 TESTS 61 156 13004800 2100
35831953 ______i______ D March 2, 2018, 10:02 a.m. OK GNU C++11 TESTS 61 156 13004800 2100
35838756 ______n______ D March 2, 2018, 1:40 p.m. OK GNU C++11 TESTS 61 156 13004800 2100
56023835 sorry_im_smurfing D June 25, 2019, 5:51 a.m. OK GNU C++14 TESTS 61 109 10956800 2100
34096441 kefaa2 D Jan. 11, 2018, 8:37 p.m. OK GNU C++14 TESTS 61 124 16076800 2100
21420078 Pakalns D Oct. 14, 2016, 10:23 a.m. OK GNU C++14 TESTS 61 140 9216000 2100
31629790 danya.smelskiy D Oct. 23, 2017, 1:09 p.m. OK GNU C++14 TESTS 61 140 9830400 2100
38946237 noDreams D June 4, 2018, 1:37 p.m. OK GNU C++14 TESTS 61 140 9932800 2100
30779691 mainstring D Sept. 27, 2017, 2:27 p.m. OK GNU C++14 TESTS 61 140 12595200 2100
42845129 mjhun D Sept. 13, 2018, 10:35 p.m. OK GNU C++14 TESTS 61 140 17920000 2100
67195626 ElangBondol D Dec. 19, 2019, 8:55 a.m. OK GNU C++14 TESTS 61 140 24268800 2100
29996094 comfi D Sept. 1, 2017, 7:31 p.m. OK GNU C++14 TESTS 61 155 6963200 2100
45707097 Hamzqq9 D Nov. 14, 2018, 12:08 p.m. OK GNU C++14 TESTS 61 155 15360000 2100
45381700 amnesiac_dusk D Nov. 6, 2018, 3:10 p.m. OK GNU C++17 TESTS 61 108 26931200 2100
60882399 aZvezda D Sept. 19, 2019, 4:07 p.m. OK GNU C++17 TESTS 61 124 10137600 2100
37230353 LiChenKoh D April 11, 2018, 4:46 p.m. OK GNU C++17 TESTS 61 124 17817600 2100
51429433 ivan100sic D March 17, 2019, 10:03 p.m. OK GNU C++17 TESTS 61 139 7884800 2100
41814712 ruo D Aug. 19, 2018, 5:54 a.m. OK GNU C++17 TESTS 61 140 11059200 2100
38780508 majk D May 30, 2018, 5:04 p.m. OK GNU C++17 TESTS 61 140 11264000 2100
55995687 tnakao D June 24, 2019, 10:16 a.m. OK GNU C++17 TESTS 61 140 45158400 2100
57097372 aviroop123 D July 15, 2019, 12:41 p.m. OK GNU C++17 TESTS 61 155 15872000 2100
61724576 fsociety00 D Oct. 2, 2019, 2:57 p.m. OK GNU C++17 TESTS 61 155 17612800 2100
45784322 AryssonFigueiredo D Nov. 15, 2018, 11:02 p.m. OK GNU C++17 TESTS 61 171 14540800 2100
935039 torrentlord D Dec. 8, 2011, 12:46 a.m. OK Java 6 TESTS 61 480 78540800 2100
926953 Berestinsky D Dec. 3, 2011, 6:13 p.m. OK Java 6 TESTS 61 500 52121600 2100
923545 ivan.popelyshev D Dec. 3, 2011, 3:54 p.m. OK Java 6 TESTS 61 560 94515200 2100
3697505 santjuan D May 9, 2013, 8:46 p.m. OK Java 6 TESTS 61 578 46387200 2100
927027 Di735 D Dec. 3, 2011, 6:16 p.m. OK Java 6 TESTS 61 610 87756800 2100
927122 Hadi_Asiaie D Dec. 3, 2011, 6:19 p.m. OK Java 6 TESTS 61 670 80486400 2100
924175 OgieKako D Dec. 3, 2011, 4:06 p.m. OK Java 6 TESTS 61 700 97894400 2100
922498 Egor D Dec. 3, 2011, 3:35 p.m. OK Java 6 TESTS 61 750 104038400 2100
924968 ArtemKadeev D Dec. 3, 2011, 4:24 p.m. OK Java 6 TESTS 61 920 129740800 2100
934008 chronotable D Dec. 7, 2011, 7:54 a.m. OK Java 6 TESTS 61 1080 162713600 2100
10206058 vjudge4 D March 8, 2015, 12:32 p.m. OK Java 7 TESTS 61 530 57958400 2100
10206048 Yukii D March 8, 2015, 12:31 p.m. OK Java 7 TESTS 61 545 57958400 2100
4207389 trunghieu11 D July 31, 2013, 6:07 a.m. OK Java 7 TESTS 61 624 49049600 2100
9056254 Slamur D Dec. 9, 2014, 8 a.m. OK Java 8 TESTS 61 296 14028800 2100
10543386 A.Elahi D April 1, 2015, 3:28 p.m. OK Java 8 TESTS 61 389 43724800 2100
59061006 Dukkha D Aug. 18, 2019, 9:42 p.m. OK Java 8 TESTS 61 436 30208000 2100
9236982 AlexFetisov D Dec. 24, 2014, 12:01 a.m. OK Java 8 TESTS 61 499 123187200 2100
10216140 a654889339 D March 9, 2015, 10:01 a.m. OK Java 8 TESTS 61 561 57651200 2100
1025685 chokudai D Jan. 9, 2012, 7:12 a.m. OK Mono C# TESTS 61 810 41267200 2100
10845952 Alex7 D April 24, 2015, 10:39 a.m. OK MS C++ TESTS 61 156 11059200 2100
43613991 vjudge4 D Sept. 30, 2018, 3:24 p.m. OK MS C++ TESTS 61 202 16076800 2100
9425717 Milanin D Jan. 13, 2015, 7:35 p.m. OK MS C++ TESTS 61 249 5017600 2100
3362856 tomas.svab D March 20, 2013, 10:32 p.m. OK MS C++ TESTS 61 265 12697600 2100
928397 Krh2011 D Dec. 4, 2011, 3:06 a.m. OK MS C++ TESTS 61 270 10444800 2100
928402 Krh2011 D Dec. 4, 2011, 3:08 a.m. OK MS C++ TESTS 61 270 10444800 2100
931103 zjut_DD D Dec. 3, 2011, 3:50 p.m. OK MS C++ TESTS 61 270 11878400 2100
933881 mongolrgata D Dec. 7, 2011, 4:24 a.m. OK MS C++ TESTS 61 280 4403200 2100
933874 mongolrgata D Dec. 7, 2011, 4:16 a.m. OK MS C++ TESTS 61 280 4403200 2100
933665 mongolrgata D Dec. 6, 2011, 8:16 p.m. OK MS C++ TESTS 61 280 6451200 2100
930564 Darooha D Dec. 5, 2011, 4:54 a.m. OK Ocaml TESTS 61 810 23142400 2100
990115 SamanSami D Dec. 28, 2011, 8:08 p.m. OK Python 2 TESTS 61 1590 17305600 2100
929197 alexej D Dec. 4, 2011, 10:18 a.m. OK Python 2 TESTS 61 1690 28364800 2100

remove filters

Back to search problems