Codeforces Round 114 (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
168 Codeforces Round 114 (Div. 2) FINISHED False 7200 405010786 March 27, 2012, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1225 ) B Wizards and Minimal Spell PROGRAMMING implementation strings 1700

B'Let 's dive into one of the most interesting areas of magic -- writing spells. Learning this exciting but challenging science is very troublesome, so now you will not learn the magic words, but only get to know the basic rules of writing spells. Each spell consists of several lines. The line, whose first non-space character is character "#" is an amplifying line and it is responsible for spell power. The remaining lines are common, and determine the effect of the spell. You came across the text of some spell. Spell was too long, so you cannot understand its meaning. So you want to make it as short as possible without changing the meaning. The only way to shorten a spell that you know is the removal of some spaces and line breaks. We know that when it comes to texts of spells, the spaces carry meaning only in the amplifying lines, so we should remove all spaces in other lines. Newlines also do not matter, unless any of the two separated lines is amplifying. Thus, if two consecutive lines are not amplifying, they need to be joined into one (i.e. we should concatenate the second line to the first one). Removing spaces in amplifying lines and concatenating the amplifying lines to anything is forbidden. Note that empty lines must be processed just like all the others: they must be joined to the adjacent non-amplifying lines, or preserved in the output, if they are surrounded with amplifying lines on both sides (i.e. the line above it, if there is one, is amplifying, and the line below it, if there is one, is amplifying too). For now those are the only instructions for removing unnecessary characters that you have to follow (oh yes, a newline is a character, too). The input contains the text of the spell, which should be reduced. Remove the extra characters and print the result to the output. The input contains multiple lines. All characters in the lines have codes from 32 to 127 (inclusive). Please note that the lines may begin with or end with one or more spac'...

Tutorials

Codeforces Round #114 — Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
1446977 TarasSavitskyi B March 31, 2012, 2:29 p.m. OK Delphi TESTS 35 130 2969600 1700
1446993 felix B March 31, 2012, 2:35 p.m. OK Delphi TESTS 35 130 2969600 1700
1427711 bearf B March 27, 2012, 3:49 p.m. OK Delphi TESTS 35 170 20172800 1700
1435147 eldar B March 28, 2012, 5:19 a.m. OK Delphi TESTS 35 220 10137600 1700
1436445 Zugzug B March 28, 2012, 12:14 p.m. OK Delphi TESTS 35 250 2969600 1700
1432611 Casio B March 27, 2012, 6:30 p.m. OK Delphi TESTS 35 250 2969600 1700
2575032 danpol B Nov. 16, 2012, 6:58 p.m. OK Delphi TESTS 35 250 11980800 1700
1437246 temarazin B March 28, 2012, 3:59 p.m. OK Delphi TESTS 35 270 2969600 1700
1435542 Natali B March 28, 2012, 7:30 a.m. OK Delphi TESTS 35 280 2969600 1700
1436771 Ramp B March 28, 2012, 1:52 p.m. OK Delphi TESTS 35 280 2969600 1700
1425467 Electronick B March 27, 2012, 3:21 p.m. OK FPC TESTS 35 50 3481600 1700
1438742 alexander-nsk94 B March 29, 2012, 6:11 a.m. OK FPC TESTS 35 50 3584000 1700
1430809 byte B March 27, 2012, 4:42 p.m. OK FPC TESTS 35 50 73011200 1700
1448989 kagamine B April 1, 2012, 11:10 a.m. OK FPC TESTS 35 60 3481600 1700
1430789 winterwolf94 B March 27, 2012, 4:41 p.m. OK FPC TESTS 35 60 3481600 1700
1430219 odule B March 27, 2012, 4:31 p.m. OK FPC TESTS 35 60 3481600 1700
1432669 Dima_qwer B March 27, 2012, 6:32 p.m. OK FPC TESTS 35 60 3584000 1700
1430437 cvb B March 27, 2012, 4:35 p.m. OK FPC TESTS 35 60 3584000 1700
1436173 iAndThen B March 28, 2012, 10:19 a.m. OK FPC TESTS 35 60 73011200 1700
1439250 lydrainbowcat B March 29, 2012, 9:22 a.m. OK FPC TESTS 35 80 3481600 1700
1433088 kawatea B March 27, 2012, 6:55 p.m. OK GNU C TESTS 35 50 2457600 1700
1477633 jspac B April 5, 2012, 11:11 a.m. OK GNU C TESTS 35 50 3481600 1700
1432612 hlwt B March 27, 2012, 6:30 p.m. OK GNU C TESTS 35 50 11366400 1700
16677578 double301 B March 12, 2016, 4:44 p.m. OK GNU C TESTS 35 154 2150400 1700
2001719 _phoenix_ B Aug. 12, 2012, 9:48 a.m. OK GNU C++ TESTS 35 30 1433600 1700
4833653 gcaaa31928 B Oct. 20, 2013, 1:12 p.m. OK GNU C++ TESTS 35 30 2048000 1700
1435117 tarun111 B March 28, 2012, 5:10 a.m. OK GNU C++ TESTS 35 30 2457600 1700
2072066 xesmaster B Aug. 31, 2012, 2:50 p.m. OK GNU C++ TESTS 35 30 3276800 1700
1707989 IdleMind B May 21, 2012, 1:34 p.m. OK GNU C++ TESTS 35 30 3481600 1700
4398806 ycid B Sept. 2, 2013, 8:14 p.m. OK GNU C++ TESTS 35 30 4198400 1700
5604469 VimLover B Jan. 2, 2014, 1:03 p.m. OK GNU C++ TESTS 35 30 8396800 1700
3222934 wrangle1005 B March 1, 2013, 7:06 a.m. OK GNU C++ TESTS 35 31 2048000 1700
2879150 GaryYe B Jan. 6, 2013, 7:27 p.m. OK GNU C++ TESTS 35 46 1024000 1700
3753544 sebasutp B May 21, 2013, 3:04 p.m. OK GNU C++ TESTS 35 46 2150400 1700
1428100 rizwanhudda B March 27, 2012, 3:55 p.m. OK GNU C++0x TESTS 35 30 5632000 1700
4032981 070101070260 B July 7, 2013, 2:43 a.m. OK GNU C++0x TESTS 35 31 2150400 1700
1585782 Archon.JK B April 20, 2012, 10:13 a.m. OK GNU C++0x TESTS 35 50 4096000 1700
8833105 hakobyan.tigran B Nov. 24, 2014, 10:13 a.m. OK GNU C++0x TESTS 35 62 3174400 1700
4908841 Orfest B Oct. 26, 2013, 10:10 p.m. OK GNU C++0x TESTS 35 62 11776000 1700
1428874 Robert B March 27, 2012, 4:08 p.m. OK GNU C++0x TESTS 35 80 3481600 1700
1433887 HAPKOMAH B March 27, 2012, 8:31 p.m. OK GNU C++0x TESTS 35 110 5120000 1700
1427000 n1k1tung B March 27, 2012, 3:39 p.m. OK GNU C++0x TESTS 35 140 4608000 1700
1424794 rexim B March 27, 2012, 3:14 p.m. OK GNU C++0x TESTS 35 140 4608000 1700
1496269 evima B April 7, 2012, 3:13 p.m. OK GNU C++0x TESTS 35 140 5120000 1700
27275220 lzr_010506 B May 22, 2017, 12:56 a.m. OK GNU C++11 TESTS 35 62 1024000 1700
12616661 luoxinchen B Aug. 20, 2015, 2:05 p.m. OK GNU C++11 TESTS 35 62 1024000 1700
14807104 wearelp B Dec. 14, 2015, 6:54 p.m. OK GNU C++11 TESTS 35 62 1843200 1700
33003792 a1s3a B Dec. 7, 2017, 2:46 p.m. OK GNU C++11 TESTS 35 62 3072000 1700
12612537 vjudge3 B Aug. 20, 2015, 7:15 a.m. OK GNU C++11 TESTS 35 62 3174400 1700
12612531 NotHere B Aug. 20, 2015, 7:14 a.m. OK GNU C++11 TESTS 35 62 3174400 1700
12612520 NotHere B Aug. 20, 2015, 7:13 a.m. OK GNU C++11 TESTS 35 62 3584000 1700
12312035 vjudge4 B Aug. 2, 2015, 7:48 a.m. OK GNU C++11 TESTS 35 62 3584000 1700
11521307 JohStraat B June 10, 2015, 12:33 p.m. OK GNU C++11 TESTS 35 62 3686400 1700
12864809 619508545 B Sept. 6, 2015, 9:18 a.m. OK GNU C++11 TESTS 35 62 5017600 1700
29809864 _Lucifer B Aug. 26, 2017, 3:43 p.m. OK GNU C++14 TESTS 35 62 4096000 1700
29730885 vjudge3 B Aug. 24, 2017, 12:23 p.m. OK GNU C++14 TESTS 35 62 4096000 1700
35908826 puyu_liao B March 4, 2018, 7 a.m. OK GNU C++14 TESTS 35 62 5529600 1700
36085673 txingml B March 9, 2018, 2:59 a.m. OK GNU C++14 TESTS 35 62 5939200 1700
31612706 DeshiBasara B Oct. 22, 2017, 7:39 p.m. OK GNU C++14 TESTS 35 62 6656000 1700
35282881 YujinYmune B Feb. 15, 2018, 5:27 a.m. OK GNU C++14 TESTS 35 62 7065600 1700
28103027 Solve_Every_Where B June 27, 2017, 7:46 p.m. OK GNU C++14 TESTS 35 62 7680000 1700
29685577 artur.socha B Aug. 22, 2017, 2:33 p.m. OK GNU C++14 TESTS 35 62 9523200 1700
35671233 0w1 B Feb. 25, 2018, 7:33 a.m. OK GNU C++14 TESTS 35 62 11366400 1700
64149200 stefdasca B Nov. 3, 2019, 10:52 a.m. OK GNU C++14 TESTS 35 92 3686400 1700
59752430 tnakao B Aug. 30, 2019, 4:17 p.m. OK GNU C++17 TESTS 35 92 2150400 1700
51807658 yuhta B March 25, 2019, 12:28 a.m. OK GNU C++17 TESTS 35 92 3686400 1700
50275120 fezjo B Feb. 21, 2019, 9:34 a.m. OK GNU C++17 TESTS 35 92 4096000 1700
57785678 spaesk B July 26, 2019, 7:41 a.m. OK GNU C++17 TESTS 35 92 5120000 1700
69933588 abdelrahman____tarek B Feb. 1, 2020, 2:09 a.m. OK GNU C++17 TESTS 35 92 6041600 1700
69933493 vjudge2 B Feb. 1, 2020, 2:05 a.m. OK GNU C++17 TESTS 35 92 6041600 1700
64149709 FlowerOfSorrow B Nov. 3, 2019, 11 a.m. OK GNU C++17 TESTS 35 92 10547200 1700
57470854 jt_112 nishant403 B July 21, 2019, 6:05 p.m. OK GNU C++17 TESTS 35 124 3686400 1700
68887071 Mohammed_Badawi B Jan. 15, 2020, 10:28 p.m. OK GNU C++17 TESTS 35 124 9216000 1700
40686588 what_xcj B July 24, 2018, 2:36 a.m. OK GNU C++17 TESTS 35 124 80179200 1700
1433617 cojna B March 27, 2012, 7:47 p.m. OK Haskell TESTS 35 310 27340800 1700
1437425 Reggies B March 28, 2012, 4:58 p.m. OK Haskell TESTS 35 310 35737600 1700
1426903 phi16 B March 27, 2012, 3:38 p.m. OK Haskell TESTS 35 340 39936000 1700
1425309 mastersobg B March 27, 2012, 3:19 p.m. OK Java 6 TESTS 35 130 43520000 1700
1434313 zulkan B March 27, 2012, 11:38 p.m. OK Java 6 TESTS 35 140 43417600 1700
1443766 knok16 B March 30, 2012, 2:37 p.m. OK Java 6 TESTS 35 140 43417600 1700
1434315 zulkan B March 27, 2012, 11:39 p.m. OK Java 6 TESTS 35 140 43417600 1700
1434306 zulkan B March 27, 2012, 11:34 p.m. OK Java 6 TESTS 35 140 43417600 1700
1445404 khanhptnk B March 31, 2012, 6:01 a.m. OK Java 6 TESTS 35 160 43417600 1700
1425980 vab B March 27, 2012, 3:26 p.m. OK Java 6 TESTS 35 160 43417600 1700
1434286 zulkan B March 27, 2012, 11:23 p.m. OK Java 6 TESTS 35 160 43417600 1700
1432728 mohamed.gaber B March 27, 2012, 6:35 p.m. OK Java 6 TESTS 35 160 43520000 1700
1433935 dusty.and.rusty B March 27, 2012, 8:40 p.m. OK Java 6 TESTS 35 170 43520000 1700
1475574 mashinist B April 4, 2012, 11:23 a.m. OK Java 7 TESTS 35 130 44953600 1700
1429015 dimoc B March 27, 2012, 4:10 p.m. OK Java 7 TESTS 35 130 44953600 1700
1430133 GoomboCode B March 27, 2012, 4:30 p.m. OK Java 7 TESTS 35 140 45158400 1700
1433751 kreep B March 27, 2012, 8:05 p.m. OK Java 7 TESTS 35 140 45363200 1700
3751861 santjuan B May 21, 2013, 1:19 a.m. OK Java 7 TESTS 35 156 102400 1700
1666699 bidzilya B May 6, 2012, 2:44 p.m. OK Java 7 TESTS 35 170 44953600 1700
1436372 Gantz B March 28, 2012, 11:50 a.m. OK Java 7 TESTS 35 200 60825600 1700
9601716 upsolving B Jan. 28, 2015, 12:01 p.m. OK Java 7 TESTS 35 278 9011200 1700
1433005 bogdan.sumy.ua B March 27, 2012, 6:50 p.m. OK Java 7 TESTS 35 300 45158400 1700
1444061 unit7 B March 30, 2012, 4:19 p.m. OK Java 7 TESTS 35 310 45158400 1700
31796396 xracer108 Owwee thesis_007 B Oct. 27, 2017, 1:12 p.m. OK Java 8 TESTS 35 342 3788800 1700
17824678 alibaba B May 9, 2016, 7:56 p.m. OK Java 8 TESTS 35 374 33792000 1700
28299476 tomdmitriev B July 5, 2017, 8:47 a.m. OK Java 8 TESTS 35 1246 30412800 1700
3355335 Nayils B March 19, 2013, 7:53 a.m. OK Mono C# TESTS 35 125 7065600 1700
1441385 m1_k3 B March 29, 2012, 6:56 p.m. OK Mono C# TESTS 35 130 19353600 1700
1426415 Eugene B March 27, 2012, 3:32 p.m. OK Mono C# TESTS 35 140 26931200 1700
1425721 bor.is B March 27, 2012, 3:23 p.m. OK Mono C# TESTS 35 160 17203200 1700
1433605 NickSerg B March 27, 2012, 7:46 p.m. OK Mono C# TESTS 35 160 22323200 1700
1633440 Quercitron B April 28, 2012, 9 a.m. OK Mono C# TESTS 35 160 23347200 1700
1444541 PuvoWar B March 30, 2012, 7:43 p.m. OK Mono C# TESTS 35 160 25497600 1700
1425445 Skiminok B March 27, 2012, 3:20 p.m. OK Mono C# TESTS 35 190 45465600 1700
1444509 PuvoWar B March 30, 2012, 7:24 p.m. OK Mono C# TESTS 35 410 19148800 1700
1426350 dannsk B March 27, 2012, 3:31 p.m. OK Mono C# TESTS 35 410 21401600 1700
13781421 Mem B Oct. 21, 2015, 9:50 p.m. OK MS C# TESTS 35 154 7270400 1700
6263970 antofik B April 5, 2014, 12:09 p.m. OK MS C# TESTS 35 216 11161600 1700
6263976 antofik B April 5, 2014, 12:10 p.m. OK MS C# TESTS 35 216 12083200 1700
5231588 marat.snowbear B Nov. 24, 2013, 11:15 p.m. OK MS C# TESTS 35 218 19251200 1700
5633180 Valentin_E B Jan. 7, 2014, 2:57 p.m. OK MS C++ TESTS 35 30 2867200 1700
1434092 romanova B March 27, 2012, 9:34 p.m. OK MS C++ TESTS 35 50 3481600 1700
1434103 romanova B March 27, 2012, 9:38 p.m. OK MS C++ TESTS 35 60 3481600 1700
1429187 AnnKats93 B March 27, 2012, 4:13 p.m. OK MS C++ TESTS 35 60 3788800 1700
1432693 wadja B March 27, 2012, 6:33 p.m. OK MS C++ TESTS 35 60 4812800 1700
1443253 J_M B March 30, 2012, 11:35 a.m. OK MS C++ TESTS 35 60 4812800 1700
1448019 TingTings B April 1, 2012, 12:26 a.m. OK MS C++ TESTS 35 60 13004800 1700
3698699 fastholf B May 10, 2013, 9:41 a.m. OK MS C++ TESTS 35 62 2048000 1700
1435668 Konjac B March 28, 2012, 8:08 a.m. OK MS C++ TESTS 35 80 3481600 1700
1428926 aeron B March 27, 2012, 4:09 p.m. OK MS C++ TESTS 35 80 3481600 1700
8469073 rsFalse B Oct. 29, 2014, 12:31 p.m. OK Perl TESTS 35 434 18534400 1700
8473785 rsFalse B Oct. 29, 2014, 8:21 p.m. OK Perl TESTS 35 496 14336000 1700
1463559 blueandgold11 B April 2, 2012, 4:09 a.m. OK Perl TESTS 35 1060 40448000 1700
8463278 rsFalse B Oct. 28, 2014, 10:39 p.m. OK Perl TESTS 35 1996 54067200 1700
1445975 taka_taka B March 31, 2012, 9:11 a.m. OK PHP TESTS 35 530 12288000 1700
1445972 taka_taka B March 31, 2012, 9:10 a.m. OK PHP TESTS 35 530 12288000 1700
1445907 taka_taka B March 31, 2012, 8:47 a.m. OK PHP TESTS 35 580 12288000 1700
1445987 taka_taka B March 31, 2012, 9:16 a.m. OK PHP TESTS 35 580 12390400 1700
15566509 kofhearts B Jan. 25, 2016, 4:08 a.m. OK PyPy 2 TESTS 35 1402 26419200 1700
1426588 tmiyamon B March 27, 2012, 3:34 p.m. OK Python 2 TESTS 35 310 5529600 1700
1434946 mfkhr B March 28, 2012, 4:08 a.m. OK Python 2 TESTS 35 380 5427200 1700
5236792 Unlenin B Nov. 25, 2013, 3:27 p.m. OK Python 2 TESTS 35 404 8499200 1700
1425953 choro3 B March 27, 2012, 3:26 p.m. OK Python 2 TESTS 35 410 5120000 1700
1428109 tony.brewerio B March 27, 2012, 3:55 p.m. OK Python 2 TESTS 35 410 5939200 1700
1436197 Escapist B March 28, 2012, 10:29 a.m. OK Python 2 TESTS 35 420 5529600 1700
1434947 hua_da B March 28, 2012, 4:10 a.m. OK Python 2 TESTS 35 420 5529600 1700
1426866 sekiye B March 27, 2012, 3:37 p.m. OK Python 2 TESTS 35 420 5529600 1700
16761688 DukeOfYork B March 17, 2016, 10:46 a.m. OK Python 2 TESTS 35 436 8704000 1700
19717308 vjudge2 B Aug. 8, 2016, 1:06 a.m. OK Python 2 TESTS 35 436 12902400 1700
54174211 Mohamed_Ayman B May 15, 2019, 1:02 p.m. OK Python 3 TESTS 35 528 11161600 1700
68423286 cor001 B Jan. 9, 2020, 12:48 a.m. OK Python 3 TESTS 35 590 11468800 1700
6003252 yugle7 B March 12, 2014, 1:20 p.m. OK Python 3 TESTS 35 654 11059200 1700
27002844 knight-erraunt B May 10, 2017, 8:24 p.m. OK Python 3 TESTS 35 840 11161600 1700
42123513 Mk_Python_v1 B Aug. 26, 2018, 1:45 p.m. OK Python 3 TESTS 35 998 11161600 1700
53891299 Dambola B May 9, 2019, 12:27 a.m. OK Python 3 TESTS 35 1432 6963200 1700
57184398 sorry_im_smurfing B July 17, 2019, 8:15 a.m. OK Ruby TESTS 35 498 21606400 1700
1462874 watashi B April 1, 2012, 8:15 p.m. OK Ruby TESTS 35 520 27340800 1700
15914891 not_bot_but_POT B Feb. 9, 2016, 1:55 p.m. OK Ruby TESTS 35 590 21606400 1700
35841882 ______u______ B March 2, 2018, 2:43 p.m. OK Ruby TESTS 35 592 27955200 1700
35841860 ______n______ B March 2, 2018, 2:43 p.m. OK Ruby TESTS 35 592 27955200 1700
35841578 _____i_____ B March 2, 2018, 2:38 p.m. OK Ruby TESTS 35 592 27955200 1700
35841565 _____k_____ B March 2, 2018, 2:38 p.m. OK Ruby TESTS 35 592 27955200 1700
35836613 ______h______ B March 2, 2018, 12:59 p.m. OK Ruby TESTS 35 592 27955200 1700
35836608 ______k______ B March 2, 2018, 12:59 p.m. OK Ruby TESTS 35 592 27955200 1700
35836293 ______i______ B March 2, 2018, 12:53 p.m. OK Ruby TESTS 35 592 27955200 1700
1443226 mvakulich B March 30, 2012, 11:21 a.m. OK Scala TESTS 35 590 44134400 1700

remove filters

Back to search problems