Codeforces Round 455 (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
909 Codeforces Round 455 (Div. 2) FINISHED False 7200 217430699 Dec. 27, 2017, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4949 ) C Python Indentation PROGRAMMING dp 1800

B'In Python, code blocks don 't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of statements. Simple statements are written in a single line, one per line. An example of a simple statement is assignment. For statements are compound statements: they contain one or several other statements. For statement consists of a header written in a separate line which starts with "for" prefix, and loop body. Loop body is a block of statements indented one level further than the header of the loop. Loop body can contain both types of statements. Loop body can 't be empty. You are given a sequence of statements without indentation. Find the number of ways in which the statements can be indented to form a valid Python program. The first line contains a single integer N (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000) -- the number of commands in the program. N lines of the program follow, each line describing a single command. Each command is either "f" (denoting "for statement") or "s" ("simple statement"). It is guaranteed that the last line is a simple statement. Output one line containing an integer - the number of ways the given sequence of statements can be indented modulo 109 xe2 x80 x89+ xe2 x80 x897. In the first test case, there is only one way to indent the program: the second for statement must be part of the body of the first one. In the second test case, there are two ways to indent the program: the second for statement can either be part of the first one 's body or a separate statement following the first one. or '...

Tutorials

Codeforces Round #455 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
54076945 Reslan C May 13, 2019, 9:03 p.m. OK Clang++17 Diagnostics TESTS 70 763 207667200 1800
33992196 SirNickolas C Jan. 7, 2018, 9:58 p.m. OK D TESTS 70 109 153702400 1800
51685961 rr_ C March 22, 2019, 2:33 p.m. OK D TESTS 70 156 122060800 1800
33797826 nanae1914 C Dec. 30, 2017, 12:28 a.m. OK D TESTS 70 171 124928000 1800
33698543 nanae1914 C Dec. 28, 2017, 1:09 a.m. OK D TESTS 70 389 186982400 1800
33705180 PAG C Dec. 28, 2017, 9:07 a.m. OK Delphi TESTS 70 62 2560000 1800
33704742 Slonik C Dec. 28, 2017, 8:45 a.m. OK FPC TESTS 70 217 101888000 1800
33693930 slavik228 C Dec. 27, 2017, 7:28 p.m. OK FPC TESTS 70 296 1740800 1800
40774825 Oompaloompa C July 26, 2018, 10:42 a.m. OK FPC TESTS 70 358 200499200 1800
34051895 rabbitcxk C Jan. 9, 2018, 3:06 p.m. OK FPC TESTS 70 670 244224000 1800
33851841 motatoes C Jan. 1, 2018, 5:18 p.m. OK GNU C TESTS 70 77 102092800 1800
34409224 Unknownnn C Jan. 21, 2018, 10:17 a.m. OK GNU C TESTS 70 78 2252800 1800
33692957 changz C Dec. 27, 2017, 6:32 p.m. OK GNU C TESTS 70 156 1945600 1800
34586896 naruhodou C Jan. 26, 2018, 7:46 p.m. OK GNU C TESTS 70 218 202649600 1800
33862976 previc C Jan. 2, 2018, 11:51 a.m. OK GNU C TESTS 70 342 202547200 1800
33885665 TsReaper C Jan. 3, 2018, 1:33 p.m. OK GNU C TESTS 70 343 2048000 1800
33677024 minQZ C Dec. 27, 2017, 4:47 p.m. OK GNU C TESTS 70 343 203059200 1800
35193291 Neymars C Feb. 13, 2018, 8:05 a.m. OK GNU C++ TESTS 70 31 1945600 1800
33684687 sydlcs C Dec. 27, 2017, 5:30 p.m. OK GNU C++ TESTS 70 31 1945600 1800
35896809 Beginner_DON C March 3, 2018, 5:33 p.m. OK GNU C++ TESTS 70 31 2048000 1800
34883708 vjudge1 C Feb. 3, 2018, 6:01 a.m. OK GNU C++ TESTS 70 31 2048000 1800
34335900 vjudge1 C Jan. 20, 2018, 2:44 a.m. OK GNU C++ TESTS 70 31 2048000 1800
33979209 cyc2016 C Jan. 7, 2018, 8:47 a.m. OK GNU C++ TESTS 70 31 2048000 1800
33979198 cyc2016 C Jan. 7, 2018, 8:46 a.m. OK GNU C++ TESTS 70 31 2048000 1800
33699274 kuroshitsuji C Dec. 28, 2017, 2:50 a.m. OK GNU C++ TESTS 70 31 2048000 1800
34052477 only_dima C Jan. 9, 2018, 3:33 p.m. OK GNU C++ TESTS 70 31 2150400 1800
34120526 Seiyaa C Jan. 13, 2018, 6:43 a.m. OK GNU C++ TESTS 70 31 2150400 1800
35644802 xiao-xiao C Feb. 24, 2018, 1:01 p.m. OK GNU C11 TESTS 70 31 2048000 1800
50293782 imalhio C Feb. 21, 2019, 7:02 p.m. OK GNU C11 TESTS 70 139 100249600 1800
33694911 codemart786 C Dec. 27, 2017, 7:49 p.m. OK GNU C11 TESTS 70 311 203059200 1800
33688647 Smurf1 C Dec. 27, 2017, 5:58 p.m. OK GNU C11 TESTS 70 498 201932800 1800
33979158 cyc2016 C Jan. 7, 2018, 8:44 a.m. OK GNU C++11 TESTS 70 30 2048000 1800
33698083 antguz C Dec. 28, 2017, 12:06 a.m. OK GNU C++11 TESTS 70 30 102297600 1800
39340158 xsc C June 17, 2018, 4:45 p.m. OK GNU C++11 TESTS 70 31 0 1800
33695966 kelement C Dec. 27, 2017, 8:47 p.m. OK GNU C++11 TESTS 70 31 2048000 1800
33979185 cyc2016 C Jan. 7, 2018, 8:46 a.m. OK GNU C++11 TESTS 70 31 2048000 1800
33820222 Francleene C Dec. 30, 2017, 8:29 p.m. OK GNU C++11 TESTS 70 31 2048000 1800
33687672 1021839 C Dec. 27, 2017, 5:51 p.m. OK GNU C++11 TESTS 70 31 2048000 1800
33686508 LuXinyu C Dec. 27, 2017, 5:42 p.m. OK GNU C++11 TESTS 70 31 2048000 1800
34477999 AdvancerMan C Jan. 23, 2018, 10:29 a.m. OK GNU C++11 TESTS 70 31 2150400 1800
34116743 Kurpilyansky C Jan. 13, 2018, 1:12 a.m. OK GNU C++11 TESTS 70 31 2150400 1800
33979244 cyc2016 C Jan. 7, 2018, 8:49 a.m. OK GNU C++14 TESTS 70 15 1945600 1800
33706310 Fortin C Dec. 28, 2017, 10:08 a.m. OK GNU C++14 TESTS 70 15 1945600 1800
34091805 mihelifi C Jan. 11, 2018, 4:16 p.m. OK GNU C++14 TESTS 70 15 1945600 1800
34091681 mihelifi C Jan. 11, 2018, 4:09 p.m. OK GNU C++14 TESTS 70 30 1945600 1800
45305719 akashkw C Nov. 4, 2018, 9:26 p.m. OK GNU C++14 TESTS 70 31 0 1800
33978970 sunny_fei C Jan. 7, 2018, 8:31 a.m. OK GNU C++14 TESTS 70 31 1945600 1800
34123929 Hemant_323 C Jan. 13, 2018, 9:54 a.m. OK GNU C++14 TESTS 70 31 1945600 1800
33986032 hello-noob C Jan. 7, 2018, 3:20 p.m. OK GNU C++14 TESTS 70 31 1945600 1800
35536642 sneh_m C Feb. 21, 2018, 2:56 a.m. OK GNU C++14 TESTS 70 31 1945600 1800
34921810 letmecode23 C Feb. 4, 2018, 11:49 a.m. OK GNU C++14 TESTS 70 31 1945600 1800
54839209 vjudge2 C May 30, 2019, 12:05 p.m. OK GNU C++17 TESTS 70 31 0 1800
61600198 fahimfarhan C Oct. 1, 2019, 10:37 a.m. OK GNU C++17 TESTS 70 46 0 1800
55324702 rohanrko96.6 C June 9, 2019, 7:17 a.m. OK GNU C++17 TESTS 70 46 0 1800
50557905 halohalo C Feb. 27, 2019, 9:07 a.m. OK GNU C++17 TESTS 70 46 0 1800
63202953 drao1 C Oct. 22, 2019, 9:41 p.m. OK GNU C++17 TESTS 70 46 102400 1800
42332075 vjudge1 C Sept. 1, 2018, 10:52 a.m. OK GNU C++17 TESTS 70 46 307200 1800
42490681 Mohamed.Sobhy C Sept. 5, 2018, 11:53 a.m. OK GNU C++17 TESTS 70 46 614400 1800
35856609 as277575 C March 2, 2018, 8:23 p.m. OK GNU C++17 TESTS 70 46 2048000 1800
43703384 AtillaAk C Oct. 2, 2018, 7:53 p.m. OK GNU C++17 TESTS 70 61 100454400 1800
49038017 vjudge3 C Jan. 27, 2019, 4:58 a.m. OK GNU C++17 TESTS 70 61 100864000 1800
34290709 ZKin C Jan. 19, 2018, 3:33 a.m. OK GNU C++17 Diagnostics TESTS 70 1075 99123200 1800
34290575 ZKin C Jan. 19, 2018, 3:24 a.m. OK GNU C++17 Diagnostics TESTS 70 1107 99123200 1800
33685746 MsetP C Dec. 27, 2017, 5:37 p.m. OK Go TESTS 70 327 236441600 1800
33696647 filo C Dec. 27, 2017, 9:38 p.m. OK Go TESTS 70 342 236544000 1800
35511526 haskellscott_wu C Feb. 20, 2018, 4:55 a.m. OK Haskell TESTS 70 436 55500800 1800
33850265 sl0th C Jan. 1, 2018, 3:43 p.m. OK Haskell TESTS 70 1684 55500800 1800
33850223 sl0th C Jan. 1, 2018, 3:41 p.m. OK Haskell TESTS 70 1699 55500800 1800
52433334 abhinavk99 C April 7, 2019, 1:20 a.m. OK Java 8 TESTS 70 140 0 1800
49514450 Harbin C Feb. 6, 2019, 12:19 a.m. OK Java 8 TESTS 70 140 0 1800
34001680 karamkontar C Jan. 8, 2018, 10:57 a.m. OK Java 8 TESTS 70 140 20684800 1800
33849528 r1shi C Jan. 1, 2018, 3 p.m. OK Java 8 TESTS 70 140 20684800 1800
42001947 namnh997 C Aug. 23, 2018, 3:45 p.m. OK Java 8 TESTS 70 155 0 1800
45255388 jmhern306 C Nov. 3, 2018, 7:23 p.m. OK Java 8 TESTS 70 171 0 1800
45117912 Viverae C Oct. 30, 2018, 11:55 p.m. OK Java 8 TESTS 70 171 0 1800
63210248 raspgary C Oct. 23, 2019, 3:16 a.m. OK Java 8 TESTS 70 187 0 1800
33683164 DanteB C Dec. 27, 2017, 5:20 p.m. OK Java 8 TESTS 70 187 20684800 1800
36887033 kak3595 C April 2, 2018, 6:52 p.m. OK Java 8 TESTS 70 187 21094400 1800
33708026 paper-lark C Dec. 28, 2017, 11:32 a.m. OK JavaScript TESTS 70 311 130969600 1800
49733107 muslim C Feb. 10, 2019, 4:08 p.m. OK Mono C# TESTS 70 404 203468800 1800
33686420 xxxcul C Dec. 27, 2017, 5:41 p.m. OK MS C# TESTS 70 186 12595200 1800
33818257 og.kostya C Dec. 30, 2017, 6:48 p.m. OK MS C# TESTS 70 233 9318400 1800
33914337 kryspinow C Jan. 5, 2018, 2:36 a.m. OK MS C# TESTS 70 701 213606400 1800
33691249 NickLatkovich C Dec. 27, 2017, 6:19 p.m. OK MS C++ TESTS 70 46 2150400 1800
38255862 scorpiowf C May 15, 2018, 4:22 a.m. OK MS C++ TESTS 70 61 3584000 1800
34412895 xchaos C Jan. 21, 2018, 12:06 p.m. OK MS C++ TESTS 70 61 102604800 1800
45253407 ckulkarni5 C Nov. 3, 2018, 5:56 p.m. OK MS C++ TESTS 70 62 307200 1800
33802198 Stepavly C Dec. 30, 2017, 6:23 a.m. OK MS C++ TESTS 70 62 102502400 1800
63350081 rbhave C Oct. 24, 2019, 9:15 p.m. OK MS C++ TESTS 70 78 0 1800
33872666 rishabh03080 C Jan. 2, 2018, 7:35 p.m. OK MS C++ TESTS 70 93 2048000 1800
33705028 Fortin C Dec. 28, 2017, 8:59 a.m. OK MS C++ TESTS 70 93 2150400 1800
34703819 vjudge3 C Jan. 30, 2018, 9:22 a.m. OK MS C++ TESTS 70 93 102604800 1800
40536387 vjudge4 C July 19, 2018, 6:30 a.m. OK MS C++ TESTS 70 108 102400 1800
63356246 vineel.kodikanti C Oct. 25, 2019, 2:50 a.m. OK MS C++ 2017 TESTS 70 124 100352000 1800
64308565 vjudge5 C Nov. 5, 2019, 12:05 p.m. OK MS C++ 2017 TESTS 70 248 100864000 1800
50506772 justpwned C Feb. 25, 2019, 8:16 p.m. OK MS C++ 2017 TESTS 70 374 201113600 1800
54910886 codeshaker C June 1, 2019, 11:07 a.m. OK MS C++ 2017 TESTS 70 436 200806400 1800
63263227 nj5649 C Oct. 23, 2019, 9:36 p.m. OK MS C++ 2017 TESTS 70 530 204697600 1800
52477983 amitjoshi C April 8, 2019, 1:59 a.m. OK PyPy 2 TESTS 70 343 6656000 1800
33701401 abhigyank C Dec. 28, 2017, 5:41 a.m. OK PyPy 2 TESTS 70 374 134656000 1800
33866605 dbhrockzz C Jan. 2, 2018, 3:23 p.m. OK PyPy 2 TESTS 70 421 24780800 1800
39341912 aeternalis1 C June 17, 2018, 6:42 p.m. OK PyPy 2 TESTS 70 482 102912000 1800
60214982 vjudge2 C Sept. 7, 2019, 11:32 a.m. OK PyPy 2 TESTS 70 577 101580800 1800
34519554 CLown1331 C Jan. 24, 2018, 2:15 p.m. OK PyPy 2 TESTS 70 686 23756800 1800
50305576 noob77777 C Feb. 22, 2019, 5:56 a.m. OK PyPy 2 TESTS 70 748 101683200 1800
34299049 eightants C Jan. 19, 2018, 10:21 a.m. OK PyPy 2 TESTS 70 795 224051200 1800
34198383 Yee_172 C Jan. 15, 2018, 1:44 p.m. OK PyPy 3 TESTS 70 187 23244800 1800
48508416 the_white_devil C Jan. 17, 2019, 6:58 p.m. OK PyPy 3 TESTS 70 218 3276800 1800
48507847 the_white_devil C Jan. 17, 2019, 6:37 p.m. OK PyPy 3 TESTS 70 218 3276800 1800
45255912 benstob C Nov. 3, 2018, 7:46 p.m. OK PyPy 3 TESTS 70 218 3276800 1800
49121716 galim665 C Jan. 28, 2019, 7:42 p.m. OK PyPy 3 TESTS 70 218 3379200 1800
61456412 shantanu1234 C Sept. 29, 2019, 6:29 a.m. OK PyPy 3 TESTS 70 218 3788800 1800
35433795 Kirillov_Alexey C Feb. 18, 2018, 12:18 a.m. OK PyPy 3 TESTS 70 218 22732800 1800
34068367 toysheeyeyraku C Jan. 10, 2018, 12:15 p.m. OK PyPy 3 TESTS 70 218 23347200 1800
33691086 myHan C Dec. 27, 2017, 6:18 p.m. OK PyPy 3 TESTS 70 218 25088000 1800
52364905 ribsthakkar C April 5, 2019, 11:39 p.m. OK PyPy 3 TESTS 70 233 3072000 1800
45918191 jaaguptamme C Nov. 18, 2018, 3:01 p.m. OK Python 2 TESTS 70 1465 307200 1800
33698797 wangkan2001 C Dec. 28, 2017, 1:45 a.m. OK Python 2 TESTS 70 1684 4710400 1800
33702660 Hahahahahahahhahaha C Dec. 28, 2017, 6:48 a.m. OK Python 2 TESTS 70 1746 5017600 1800
34198328 Yee_172 C Jan. 15, 2018, 1:42 p.m. OK Python 2 TESTS 70 1762 5017600 1800
41431450 Vaibhav96 C Aug. 10, 2018, 12:49 p.m. OK Python 2 TESTS 70 1809 307200 1800
39213237 Ali_Pi C June 13, 2018, 10:37 a.m. OK Python 2 TESTS 70 1825 307200 1800
66461399 dsa_problems C Dec. 7, 2019, 2:55 p.m. OK Python 3 TESTS 70 1731 409600 1800
66798490 thucnc C Dec. 13, 2019, 5:54 p.m. OK Python 3 TESTS 70 1746 307200 1800
66628957 JustNoob107 C Dec. 11, 2019, 10:22 a.m. OK Python 3 TESTS 70 1746 307200 1800
66624666 thucnc C Dec. 11, 2019, 8:27 a.m. OK Python 3 TESTS 70 1980 307200 1800
48533472 Arsanuos C Jan. 18, 2019, 1:08 p.m. OK Python 3 TESTS 70 1996 307200 1800
61446798 krishna_gupta_ C Sept. 28, 2019, 9:41 p.m. OK Python 3 TESTS 70 1996 409600 1800
33686929 limed C Dec. 27, 2017, 5:45 p.m. OK Scala TESTS 70 639 39526400 1800
33704104 mikcorer C Dec. 28, 2017, 8:10 a.m. OK Scala TESTS 70 702 39116800 1800
33820492 IvanDyachenko C Dec. 30, 2017, 8:43 p.m. OK Scala TESTS 70 997 39321600 1800

remove filters

Back to search problems