Codeforces Round 220 (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
374 Codeforces Round 220 (Div. 2) FINISHED False 7200 350145023 Dec. 18, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3343 ) B Inna and Nine PROGRAMMING combinatorics greedy 1600

B"Inna loves digit 9 very much. That's why she asked Dima to write a small number consisting of nines. But Dima must have misunderstood her and he wrote a very large number a, consisting of digits from 1 to 9. Inna wants to slightly alter the number Dima wrote so that in the end the number contained as many digits nine as possible. In one move, Inna can choose two adjacent digits in a number which sum equals 9 and replace them by a single digit 9. For instance, Inna can alter number 14545181 like this: 14545181 xe2 x80 x89 xe2 x86 x92 xe2 x80 x891945181 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89194519 xe2 x80 x89 xe2 x86 x92 xe2 x80 x8919919. Also, she can use this method to transform number 14545181 into number 19991. Inna will not transform it into 149591 as she can get numbers 19919 and 19991 which contain more digits nine. Dima is a programmer so he wants to find out how many distinct numbers containing as many digits nine as possible Inna can get from the written number. Help him with this challenging task. The first line of the input contains integer a (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910100000). Number a doesn't have any zeroes. In a single line print a single integer -- the answer to the problem. It is guaranteed that the answer to the problem doesn't exceed 263 xe2 x80 x89- xe2 x80 x891. Please, do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use the cin, cout streams or the %I64d specifier. Notes to the samples In the first sample Inna can get the following numbers: 369727 xe2 x80 x89 xe2 x86 x92 xe2 x80 x8999727 xe2 x80 x89 xe2 x86 x92 xe2 x80 x899997, 369727 xe2 x80 x89 xe2 x86 x92 xe2 x80 x8999727 xe2 x80 x89 xe2 x86 x92 xe2 x80 x899979. In the second sample, Inna can act like this: 123456789987654321 xe2 x80 x89 xe2 x86 x92 xe2 x80 x8912396789987654321 xe2 x80 x89 xe2 x86 x92 xe2 x80 x891239678998769321."...

Tutorials

Codeforces Round #220 (Div. 2) разбор

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5663491 izuru B Jan. 12, 2014, 7:37 a.m. OK D TESTS 25 15 102400 1600
5532775 Xellos B Dec. 27, 2013, 10:04 p.m. OK D TESTS 25 15 1433600 1600
5465321 Casio B Dec. 18, 2013, 4:30 p.m. OK Delphi TESTS 24 15 716800 1600
5467899 aangairbender B Dec. 18, 2013, 5:12 p.m. OK Delphi TESTS 24 15 819200 1600
5466456 Djez B Dec. 18, 2013, 4:49 p.m. OK Delphi TESTS 24 15 4096000 1600
5469698 ruban B Dec. 18, 2013, 6:17 p.m. OK Delphi TESTS 24 15 12390400 1600
5467519 hey_boris B Dec. 18, 2013, 5:06 p.m. OK Delphi TESTS 24 31 307200 1600
5467056 fedorusov B Dec. 18, 2013, 4:58 p.m. OK Delphi TESTS 24 31 307200 1600
8171326 gyz_gyz B Oct. 11, 2014, 5:49 a.m. OK FPC TESTS 25 15 0 1600
16523673 Andrey15253545 B March 4, 2016, 9:41 p.m. OK FPC TESTS 25 15 307200 1600
5805844 Diligas B Jan. 25, 2014, 12:20 p.m. OK FPC TESTS 25 15 307200 1600
5630003 Misha100896 B Jan. 6, 2014, 11:18 p.m. OK FPC TESTS 25 15 307200 1600
5480301 voquocthang B Dec. 20, 2013, 10:47 a.m. OK FPC TESTS 25 15 307200 1600
5473514 Luqman B Dec. 19, 2013, 7:39 a.m. OK FPC TESTS 24 15 307200 1600
5470907 graceoflives B Dec. 18, 2013, 9:27 p.m. OK FPC TESTS 24 15 307200 1600
5470634 no_space B Dec. 18, 2013, 8:11 p.m. OK FPC TESTS 24 15 307200 1600
5463781 PTNK011215 B Dec. 18, 2013, 4:09 p.m. OK FPC TESTS 24 15 307200 1600
5463237 ptnk061215 B Dec. 18, 2013, 4:01 p.m. OK FPC TESTS 24 15 307200 1600
5598591 CorupTa B Jan. 1, 2014, 2:34 p.m. OK GNU C TESTS 25 0 102400 1600
5469405 genius.zhaoyi B Dec. 18, 2013, 6:06 p.m. OK GNU C TESTS 24 15 102400 1600
5644083 vis10326 B Jan. 9, 2014, 12:50 p.m. OK GNU C TESTS 25 15 102400 1600
5468824 pagla_jogai B Dec. 18, 2013, 5:26 p.m. OK GNU C TESTS 24 15 102400 1600
5468080 acafterwa B Dec. 18, 2013, 5:15 p.m. OK GNU C TESTS 24 15 102400 1600
5467754 zhu081607 B Dec. 18, 2013, 5:10 p.m. OK GNU C TESTS 24 15 102400 1600
5466396 zeosutt B Dec. 18, 2013, 4:47 p.m. OK GNU C TESTS 24 15 102400 1600
5466266 frcepeda B Dec. 18, 2013, 4:45 p.m. OK GNU C TESTS 24 15 102400 1600
5462911 m17 B Dec. 18, 2013, 3:56 p.m. OK GNU C TESTS 24 15 102400 1600
7009079 vjudge4 B July 4, 2014, 7:57 a.m. OK GNU C TESTS 25 15 204800 1600
5471484 diamondlx B Dec. 19, 2013, 12:41 a.m. OK GNU C++ TESTS 24 0 0 1600
5466333 JGalt B Dec. 18, 2013, 4:47 p.m. OK GNU C++ TESTS 24 0 0 1600
5480126 sky0917 B Dec. 20, 2013, 10:10 a.m. OK GNU C++ TESTS 25 0 102400 1600
5469237 smartyfh B Dec. 18, 2013, 6 p.m. OK GNU C++ TESTS 24 0 102400 1600
5468939 sensei01 B Dec. 18, 2013, 5:28 p.m. OK GNU C++ TESTS 24 0 102400 1600
5468754 zyvas B Dec. 18, 2013, 5:25 p.m. OK GNU C++ TESTS 24 0 102400 1600
5468022 yidian B Dec. 18, 2013, 5:14 p.m. OK GNU C++ TESTS 24 0 102400 1600
5468696 cgy4ever B Dec. 18, 2013, 5:24 p.m. OK GNU C++ TESTS 24 0 307200 1600
5664972 zstu-cs B Jan. 12, 2014, noon OK GNU C++ TESTS 25 0 512000 1600
5468367 onlyyoucarryme B Dec. 18, 2013, 5:20 p.m. OK GNU C++ TESTS 24 0 1024000 1600
8241761 germanchowder B Oct. 15, 2014, 11:11 p.m. OK GNU C++0x TESTS 25 15 0 1600
5475894 singh B Dec. 19, 2013, 2:49 p.m. OK GNU C++0x TESTS 24 15 0 1600
5697129 delta_4d B Jan. 15, 2014, 12:54 p.m. OK GNU C++0x TESTS 25 15 102400 1600
6649014 papaga3 B May 18, 2014, 6:30 a.m. OK GNU C++0x TESTS 25 15 102400 1600
5515440 enrevol B Dec. 25, 2013, 1 a.m. OK GNU C++0x TESTS 25 15 102400 1600
5476052 MorningSYJ B Dec. 19, 2013, 3:15 p.m. OK GNU C++0x TESTS 24 15 102400 1600
5472391 2011330300713 B Dec. 19, 2013, 4:14 a.m. OK GNU C++0x TESTS 24 15 102400 1600
5470212 zgmf_x19a B Dec. 18, 2013, 6:59 p.m. OK GNU C++0x TESTS 24 15 102400 1600
5466800 asalwaysdontbeahero B Dec. 18, 2013, 4:54 p.m. OK GNU C++0x TESTS 24 15 102400 1600
5464859 RamTararam B Dec. 18, 2013, 4:23 p.m. OK GNU C++0x TESTS 24 15 102400 1600
62576246 MHHasan B Oct. 14, 2019, 3:59 p.m. OK GNU C11 TESTS 25 31 102400 1600
50738596 vjudge1 B March 3, 2019, 2:07 p.m. OK GNU C11 TESTS 25 31 512000 1600
55585516 hitman_28 B June 15, 2019, 9:15 a.m. OK GNU C11 TESTS 25 46 4096000 1600
12241789 giorgin B July 27, 2015, 2:25 p.m. OK GNU C++11 TESTS 25 15 0 1600
16373740 KHUSRAV B Feb. 27, 2016, 6:45 a.m. OK GNU C++11 TESTS 25 15 0 1600
14128911 sicon54 B Nov. 7, 2015, 6:27 p.m. OK GNU C++11 TESTS 25 15 0 1600
13888455 yuehei B Oct. 27, 2015, 10:17 a.m. OK GNU C++11 TESTS 25 15 102400 1600
12127963 shiva_r31 B July 20, 2015, 10:13 a.m. OK GNU C++11 TESTS 25 15 102400 1600
11398822 -XraY- B June 3, 2015, 8:44 a.m. OK GNU C++11 TESTS 25 15 102400 1600
27173069 RNS_MHB B May 17, 2017, 6:03 a.m. OK GNU C++11 TESTS 25 15 102400 1600
15342038 anthonyhkf B Jan. 14, 2016, 9:24 a.m. OK GNU C++11 TESTS 25 15 102400 1600
14933324 I_Love_Bofei B Dec. 23, 2015, 5:20 a.m. OK GNU C++11 TESTS 25 15 102400 1600
32508769 maxibonino B Nov. 20, 2017, 6:46 p.m. OK GNU C++11 TESTS 25 15 204800 1600
44330305 aniKet_gAjare B Oct. 14, 2018, 6:02 p.m. OK GNU C++14 TESTS 25 15 0 1600
32380471 Flash-boy B Nov. 17, 2017, 1:59 p.m. OK GNU C++14 TESTS 25 15 102400 1600
49193908 VankineeniTawrun249 B Jan. 30, 2019, 9:28 a.m. OK GNU C++14 TESTS 25 15 102400 1600
26877665 ikaidul B May 5, 2017, 9:59 a.m. OK GNU C++14 TESTS 25 15 102400 1600
27201180 srinu37 B May 18, 2017, 4:54 p.m. OK GNU C++14 TESTS 25 15 102400 1600
40524808 wzz-huchi B July 18, 2018, 7:25 p.m. OK GNU C++14 TESTS 25 15 102400 1600
68110635 nagasaisujan160998 B Jan. 3, 2020, 9:23 a.m. OK GNU C++14 TESTS 25 15 307200 1600
64854204 Bohoty B Nov. 13, 2019, 9:24 p.m. OK GNU C++14 TESTS 25 15 307200 1600
56519033 Bignubie B July 4, 2019, 2:07 p.m. OK GNU C++14 TESTS 25 15 307200 1600
56177635 dwai009 B June 27, 2019, 8:12 p.m. OK GNU C++14 TESTS 25 15 307200 1600
57144248 CFish B July 16, 2019, 12:20 p.m. OK GNU C++17 TESTS 25 15 102400 1600
57124097 Kirin_Sunset B July 16, 2019, 3:10 a.m. OK GNU C++17 TESTS 25 15 102400 1600
60406335 jalalium B Sept. 11, 2019, 6:50 p.m. OK GNU C++17 TESTS 25 15 307200 1600
54159163 praveenojha33 B May 15, 2019, 5:43 a.m. OK GNU C++17 TESTS 25 15 307200 1600
53316378 AryaKnight B April 26, 2019, 10:33 a.m. OK GNU C++17 TESTS 25 15 307200 1600
62218079 007kartik B Oct. 9, 2019, 4:36 p.m. OK GNU C++17 TESTS 25 15 307200 1600
65299314 asdf1_CF B Nov. 18, 2019, 12:40 p.m. OK GNU C++17 TESTS 25 15 307200 1600
49366084 UWPLP B Feb. 2, 2019, 3:06 p.m. OK GNU C++17 TESTS 25 15 512000 1600
50324213 Hooded_Hood B Feb. 22, 2019, 3:47 p.m. OK GNU C++17 TESTS 25 15 1126400 1600
56532354 Quinas B July 4, 2019, 8:39 p.m. OK GNU C++17 TESTS 25 15 1126400 1600
30384128 mishagam B Sept. 16, 2017, 1:25 p.m. OK Go TESTS 25 15 0 1600
5470900 pin3da B Dec. 18, 2013, 9:25 p.m. OK Java 6 TESTS 24 46 0 1600
5486934 araim B Dec. 21, 2013, 12:40 p.m. OK Java 6 TESTS 25 46 102400 1600
6061939 kazypos B March 18, 2014, 3:11 p.m. OK Java 6 TESTS 25 62 0 1600
5646311 mkirsche B Jan. 9, 2014, 4:33 p.m. OK Java 6 TESTS 25 62 0 1600
5603482 arzjain B Jan. 2, 2014, 10:14 a.m. OK Java 6 TESTS 25 62 0 1600
5594404 breeze B Dec. 31, 2013, 6:38 p.m. OK Java 6 TESTS 25 62 0 1600
5473688 vishwacs111 B Dec. 19, 2013, 8:09 a.m. OK Java 6 TESTS 24 62 0 1600
5470893 pin3da B Dec. 18, 2013, 9:23 p.m. OK Java 6 TESTS 24 62 0 1600
5470892 DiegoAE B Dec. 18, 2013, 9:22 p.m. OK Java 6 TESTS 24 62 0 1600
5469881 1e9 B Dec. 18, 2013, 6:28 p.m. OK Java 6 TESTS 24 62 0 1600
5596553 Jaimini-DAIICT B Jan. 1, 2014, 7:20 a.m. OK Java 7 TESTS 25 46 0 1600
5485285 KNIGHT0X300 B Dec. 21, 2013, 6:28 a.m. OK Java 7 TESTS 25 46 0 1600
5484589 brett1479 B Dec. 21, 2013, 2:15 a.m. OK Java 7 TESTS 25 46 0 1600
5464585 llaki B Dec. 18, 2013, 4:19 p.m. OK Java 7 TESTS 24 46 0 1600
11116425 aakashkhatri B May 16, 2015, 11:11 a.m. OK Java 7 TESTS 25 62 0 1600
5696238 AZerone B Jan. 15, 2014, 11:51 a.m. OK Java 7 TESTS 25 62 0 1600
5658742 Pshenichnoe B Jan. 11, 2014, 11:17 a.m. OK Java 7 TESTS 25 62 0 1600
5639741 DoublePointer B Jan. 8, 2014, 8:48 p.m. OK Java 7 TESTS 25 62 0 1600
5639586 jooman B Jan. 8, 2014, 8:10 p.m. OK Java 7 TESTS 25 62 0 1600
5621578 tiny_code B Jan. 5, 2014, 11:16 a.m. OK Java 7 TESTS 25 62 0 1600
69186689 sakt_coder B Jan. 20, 2020, 12:11 p.m. OK Java 8 TESTS 25 108 0 1600
16624774 Corvus B March 9, 2016, 9:37 p.m. OK Java 8 TESTS 25 108 0 1600
11810547 Hartha B June 27, 2015, 9:31 p.m. OK Java 8 TESTS 25 108 0 1600
26333521 donli B April 13, 2017, 8:48 a.m. OK Java 8 TESTS 25 108 20582400 1600
68076962 O_E B Jan. 2, 2020, 12:55 p.m. OK Java 8 TESTS 25 109 0 1600
60812559 BiggestPrime B Sept. 18, 2019, 6:16 p.m. OK Java 8 TESTS 25 109 0 1600
57839030 rathi.raghav00 B July 27, 2019, 8:37 a.m. OK Java 8 TESTS 25 109 0 1600
47465189 deepak4669 B Dec. 24, 2018, 5:32 p.m. OK Java 8 TESTS 25 109 0 1600
43008357 Ahmed.Shawky B Sept. 17, 2018, 5:08 p.m. OK Java 8 TESTS 25 109 0 1600
32247259 Kammola B Nov. 12, 2017, 3:20 p.m. OK Java 8 TESTS 25 109 0 1600
5472838 Wizmann B Dec. 19, 2013, 5:35 a.m. OK JavaScript TESTS 24 15 2252800 1600
5644191 bortolozz B Jan. 9, 2014, 1:12 p.m. OK MS C# TESTS 25 31 307200 1600
5496767 Fozar B Dec. 23, 2013, 11:21 a.m. OK MS C# TESTS 25 31 307200 1600
5468402 Kavir B Dec. 18, 2013, 5:20 p.m. OK MS C# TESTS 24 31 409600 1600
5469219 Kavir B Dec. 18, 2013, 5:59 p.m. OK MS C# TESTS 24 31 512000 1600
5492307 marshmallow B Dec. 22, 2013, 12:45 p.m. OK MS C# TESTS 25 31 1433600 1600
16023313 og.kostya B Feb. 14, 2016, 7:43 p.m. OK MS C# TESTS 25 46 512000 1600
5466324 ManojMahadik B Dec. 18, 2013, 4:46 p.m. OK MS C# TESTS 24 46 614400 1600
10522388 azukun B March 30, 2015, 7:32 a.m. OK MS C# TESTS 25 46 1228800 1600
5466529 Guliash B Dec. 18, 2013, 4:50 p.m. OK MS C# TESTS 24 62 3686400 1600
5777102 prok.iryna B Jan. 23, 2014, 12:38 p.m. OK MS C# TESTS 25 77 3072000 1600
6615749 lovedl B May 14, 2014, 2:19 p.m. OK MS C++ TESTS 25 15 0 1600
6194484 L_Ecry B March 31, 2014, 2:32 a.m. OK MS C++ TESTS 25 15 0 1600
5997593 torte B March 11, 2014, 3:59 p.m. OK MS C++ TESTS 25 15 0 1600
5744169 kevinliu B Jan. 20, 2014, 5:31 a.m. OK MS C++ TESTS 25 15 0 1600
5741579 filo B Jan. 19, 2014, 4:21 p.m. OK MS C++ TESTS 25 15 0 1600
5657922 Elun B Jan. 11, 2014, 9:03 a.m. OK MS C++ TESTS 25 15 0 1600
5598331 kanghuanping B Jan. 1, 2014, 1:53 p.m. OK MS C++ TESTS 25 15 0 1600
5551691 fungi B Dec. 29, 2013, 3:19 p.m. OK MS C++ TESTS 25 15 0 1600
5534611 apayas B Dec. 28, 2013, 8:27 a.m. OK MS C++ TESTS 25 15 0 1600
5490161 okey B Dec. 22, 2013, 4:15 a.m. OK MS C++ TESTS 25 15 0 1600
50082797 cleverhero B Feb. 18, 2019, 5:36 a.m. OK MS C++ 2017 TESTS 25 46 307200 1600
13001499 m7mdbadawy B Sept. 14, 2015, 11:30 p.m. OK PyPy 2 TESTS 25 92 716800 1600
47807615 HeyLaCC B Jan. 1, 2019, 8:32 a.m. OK PyPy 3 TESTS 25 155 1433600 1600
68477153 seleznev_dima B Jan. 10, 2020, 6:08 a.m. OK PyPy 3 TESTS 25 155 1945600 1600
59953062 ashwin2000 B Sept. 3, 2019, 3:09 p.m. OK PyPy 3 TESTS 25 155 2252800 1600
60333957 rajat_2548 B Sept. 10, 2019, 7:33 a.m. OK PyPy 3 TESTS 25 155 2457600 1600
55817295 MajAK B June 20, 2019, 6:59 a.m. OK PyPy 3 TESTS 25 155 2457600 1600
57446255 kopok2 B July 21, 2019, 8:19 a.m. OK PyPy 3 TESTS 25 155 4915200 1600
60421319 CubeCakes B Sept. 12, 2019, 6:11 a.m. OK PyPy 3 TESTS 25 156 5120000 1600
69089910 gaidash B Jan. 19, 2020, 9:45 a.m. OK PyPy 3 TESTS 25 156 8089600 1600
5660063 yugle7 B Jan. 11, 2014, 2:39 p.m. OK Python 2 TESTS 25 62 1740800 1600
5467909 kevinsogo B Dec. 18, 2013, 5:12 p.m. OK Python 2 TESTS 24 93 204800 1600
5777776 tenyoku8478 B Jan. 23, 2014, 2:31 p.m. OK Python 2 TESTS 25 93 1740800 1600
5693975 yexuDart B Jan. 15, 2014, 3:58 a.m. OK Python 2 TESTS 25 93 1740800 1600
5466081 thiagoss B Dec. 18, 2013, 4:43 p.m. OK Python 2 TESTS 24 93 3072000 1600
8517655 rincewind B Nov. 1, 2014, 8:19 p.m. OK Python 2 TESTS 25 109 1024000 1600
5464009 avoit B Dec. 18, 2013, 4:12 p.m. OK Python 2 TESTS 24 109 1024000 1600
5502380 qianlongzju B Dec. 24, 2013, 1:12 p.m. OK Python 2 TESTS 25 124 307200 1600
5470692 shaileshahuja B Dec. 18, 2013, 8:24 p.m. OK Python 2 TESTS 24 124 1331200 1600
5858541 alex-mercer B Jan. 31, 2014, 5:56 p.m. OK Python 2 TESTS 25 124 2048000 1600
5660055 yugle7 B Jan. 11, 2014, 2:37 p.m. OK Python 3 TESTS 25 78 102400 1600
11481624 poikniok B June 7, 2015, 4:55 a.m. OK Python 3 TESTS 25 108 1536000 1600
5463471 TsunamiNoLetGo B Dec. 18, 2013, 4:04 p.m. OK Python 3 TESTS 24 140 0 1600
29510145 Qumeric B Aug. 16, 2017, 4:46 p.m. OK Python 3 TESTS 25 140 204800 1600
5479720 aradhya_makkar B Dec. 20, 2013, 8:46 a.m. OK Python 3 TESTS 25 171 102400 1600
56527130 LintuStorm B July 4, 2019, 5:40 p.m. OK Python 3 TESTS 25 171 204800 1600
5597392 aleksandr B Jan. 1, 2014, 10:38 a.m. OK Python 3 TESTS 25 171 307200 1600
5775606 shining365 B Jan. 23, 2014, 8:34 a.m. OK Python 3 TESTS 25 171 4198400 1600
26204294 YazanRi B April 7, 2017, 9:06 p.m. OK Python 3 TESTS 25 171 5632000 1600
35862755 ______u______ B March 2, 2018, 10:31 p.m. OK Python 3 TESTS 25 171 5836800 1600
5908532 fabsn B Feb. 6, 2014, 4:53 a.m. OK Ruby TESTS 25 124 8806400 1600
22705435 karthickpdy B Dec. 5, 2016, 5:59 a.m. OK Ruby TESTS 25 140 16793600 1600
5464388 limed B Dec. 18, 2013, 4:17 p.m. OK Scala TESTS 24 249 307200 1600

remove filters

Back to search problems