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 350317797 Dec. 18, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2762 ) C Inna and Dima PROGRAMMING dfs and similar dp graphs implementation 2000

B'Inna and Dima bought a table of size n xe2 x80 x89 xc3 x97 xe2 x80 x89m in the shop. Each cell of the table contains a single letter: "D", "I", "M", "A". Inna loves Dima, so she wants to go through his name as many times as possible as she moves through the table. For that, Inna acts as follows: Depending on the choice of the initial table cell, Inna can go through name DIMA either an infinite number of times or some positive finite number of times or she can 't go through his name once. Help Inna find out what maximum number of times she can go through name DIMA. The first line of the input contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89103). Then follow n lines that describe Inna and Dima 's table. Each line contains m characters. Each character is one of the following four characters: "D", "I", "M", "A". Note that it is not guaranteed that the table contains at least one letter "D". If Inna cannot go through name DIMA once, print on a single line "Poor Dima!" without the quotes. If there is the infinite number of names DIMA Inna can go through, print "Poor Inna!" without the quotes. Otherwise print a single integer -- the maximum number of times Inna can go through name DIMA. Notes to the samples: In the first test sample, Inna cannot go through name DIMA a single time. In the second test sample, Inna can go through the infinite number of words DIMA. For that, she should move in the clockwise direction starting from the lower right corner. In the third test sample the best strategy is to start from the cell in the upper left corner of the table. Starting from this cell, Inna can go through name DIMA four times. '...

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
5533361 Xellos C Dec. 28, 2013, 2:12 a.m. OK D TESTS 47 296 34406400 2000
5656249 Misha100896 C Jan. 10, 2014, 4:59 p.m. OK Delphi TESTS 47 93 167526400 2000
5463421 MrJigan1488 C Dec. 18, 2013, 4:03 p.m. OK Delphi TESTS 47 842 88371200 2000
5462603 Alex_2oo8 C Dec. 18, 2013, 3:52 p.m. OK FPC TESTS 47 46 11571200 2000
5838742 ZeRoGerc C Jan. 30, 2014, 1:34 p.m. OK FPC TESTS 47 46 14131200 2000
5472068 santa_calus C Dec. 19, 2013, 3:02 a.m. OK FPC TESTS 47 46 14745600 2000
5470479 AndrewVychev C Dec. 18, 2013, 7:39 p.m. OK FPC TESTS 47 46 15564800 2000
17830333 Gray_58 C May 10, 2016, 10:46 a.m. OK FPC TESTS 47 61 13004800 2000
5463356 PTNK13091996 C Dec. 18, 2013, 4:02 p.m. OK FPC TESTS 47 62 13516800 2000
5464772 Oryshych C Dec. 18, 2013, 4:22 p.m. OK FPC TESTS 47 62 14028800 2000
5544471 BenderRodriguez C Dec. 28, 2013, 7:36 p.m. OK FPC TESTS 47 62 16179200 2000
5467497 touristv2 C Dec. 18, 2013, 5:06 p.m. OK FPC TESTS 47 62 17510400 2000
5470163 vietnktp C Dec. 18, 2013, 6:53 p.m. OK FPC TESTS 47 62 118272000 2000
5464676 frcepeda C Dec. 18, 2013, 4:21 p.m. OK GNU C TESTS 47 31 15667200 2000
5468358 m17 C Dec. 18, 2013, 5:19 p.m. OK GNU C TESTS 47 31 21913600 2000
7009367 vjudge4 C July 4, 2014, 8:50 a.m. OK GNU C TESTS 47 46 22016000 2000
7009307 vjudge4 C July 4, 2014, 8:39 a.m. OK GNU C TESTS 47 62 22016000 2000
5466077 genius.zhaoyi C Dec. 18, 2013, 4:43 p.m. OK GNU C TESTS 47 109 26521600 2000
5472149 acafterwa C Dec. 19, 2013, 3:23 a.m. OK GNU C TESTS 47 156 17920000 2000
14036711 130705009 C Nov. 3, 2015, 3:57 a.m. OK GNU C++ TESTS 47 30 17715200 2000
5465245 BigSBandme C Dec. 18, 2013, 4:29 p.m. OK GNU C++ TESTS 47 31 9318400 2000
7549768 Mothaiba C Aug. 22, 2014, 7:16 a.m. OK GNU C++ TESTS 47 31 14233600 2000
12423267 VainChan C Aug. 9, 2015, 8:30 a.m. OK GNU C++ TESTS 47 31 14540800 2000
12427698 vjudge5 C Aug. 9, 2015, 3:44 p.m. OK GNU C++ TESTS 47 31 14643200 2000
5515078 lazykoder03 C Dec. 24, 2013, 10:38 p.m. OK GNU C++ TESTS 47 31 14643200 2000
5479191 vacuumer C Dec. 20, 2013, 6:41 a.m. OK GNU C++ TESTS 47 31 14643200 2000
5478660 HaibaraAi C Dec. 20, 2013, 4:11 a.m. OK GNU C++ TESTS 47 31 14643200 2000
8058768 OOOO_ C Oct. 2, 2014, 1:58 p.m. OK GNU C++ TESTS 47 31 14745600 2000
7009409 vjudge3 C July 4, 2014, 8:58 a.m. OK GNU C++ TESTS 47 31 14745600 2000
5468524 Leonspirit C Dec. 18, 2013, 5:22 p.m. OK GNU C++0x TESTS 47 31 13516800 2000
5633186 johannesk C Jan. 7, 2014, 2:59 p.m. OK GNU C++0x TESTS 47 31 14643200 2000
5476432 yoooou C Dec. 19, 2013, 4:25 p.m. OK GNU C++0x TESTS 47 31 18022400 2000
5470241 mruxim C Dec. 18, 2013, 7:03 p.m. OK GNU C++0x TESTS 47 31 19660800 2000
7236193 jianmodgqb C July 25, 2014, 12:12 a.m. OK GNU C++0x TESTS 47 31 21913600 2000
5462894 Dwylkz C Dec. 18, 2013, 3:56 p.m. OK GNU C++0x TESTS 47 31 22016000 2000
10304917 Cheshulko C March 16, 2015, 8:09 p.m. OK GNU C++0x TESTS 47 31 24780800 2000
5470830 tientmse610xx C Dec. 18, 2013, 9:01 p.m. OK GNU C++0x TESTS 47 31 26112000 2000
10304839 Cheshulko C March 16, 2015, 7:58 p.m. OK GNU C++0x TESTS 47 31 29696000 2000
5468860 shopnobaj_raju C Dec. 18, 2013, 5:27 p.m. OK GNU C++0x TESTS 47 31 31641600 2000
21760333 Yash_ C Oct. 24, 2016, 10:19 p.m. OK GNU C++11 TESTS 47 30 15462400 2000
40989261 ReaLNero1 C July 30, 2018, 10:45 p.m. OK GNU C++11 TESTS 47 31 15462400 2000
12431817 vjudge3 C Aug. 10, 2015, 4:02 a.m. OK GNU C++11 TESTS 47 31 17715200 2000
12431811 BJTUone C Aug. 10, 2015, 4:01 a.m. OK GNU C++11 TESTS 47 31 17715200 2000
13129823 khaledA C Sept. 21, 2015, 4:35 p.m. OK GNU C++11 TESTS 47 31 17817600 2000
14058319 zqdnr C Nov. 4, 2015, 1:40 p.m. OK GNU C++11 TESTS 47 31 17920000 2000
12414848 radical C Aug. 8, 2015, 1:11 p.m. OK GNU C++11 TESTS 47 31 18944000 2000
30565398 __timus C Sept. 21, 2017, 1:50 a.m. OK GNU C++11 TESTS 47 31 19968000 2000
34963911 zstu_MingSD C Feb. 6, 2018, 7:45 a.m. OK GNU C++11 TESTS 47 31 20992000 2000
34963349 zstu_MingSD C Feb. 6, 2018, 7:19 a.m. OK GNU C++11 TESTS 47 31 20992000 2000
28779002 21August C July 22, 2017, 12:50 p.m. OK GNU C++14 TESTS 47 30 17510400 2000
27312830 gerardd C May 24, 2017, 2:27 a.m. OK GNU C++14 TESTS 47 31 15667200 2000
27202441 glpknt111 C May 18, 2017, 6:12 p.m. OK GNU C++14 TESTS 47 31 15667200 2000
34421225 corba C Jan. 21, 2018, 5:33 p.m. OK GNU C++14 TESTS 47 31 17817600 2000
24667673 Snow_Leopard C Feb. 14, 2017, 11:08 a.m. OK GNU C++14 TESTS 47 31 20684800 2000
32424071 sinus_070 C Nov. 18, 2017, 8 a.m. OK GNU C++14 TESTS 47 31 21708800 2000
29897505 danya.smelskiy C Aug. 29, 2017, 5:04 p.m. OK GNU C++14 TESTS 47 31 22937600 2000
63926439 wronganswer C Oct. 31, 2019, 1:08 p.m. OK GNU C++14 TESTS 47 31 23756800 2000
27470098 int3xcc C May 31, 2017, 3:27 p.m. OK GNU C++14 TESTS 47 31 27648000 2000
61943713 ovidiupita C Oct. 5, 2019, 9:23 p.m. OK GNU C++14 TESTS 47 46 17920000 2000
54872763 ish.ranga11 C May 31, 2019, 10:11 a.m. OK GNU C++17 TESTS 47 31 9113600 2000
53312583 jaaguptamme C April 26, 2019, 7:58 a.m. OK GNU C++17 TESTS 47 31 19353600 2000
35579106 WooDeND C Feb. 22, 2018, 5:07 p.m. OK GNU C++17 TESTS 47 31 19865600 2000
46397407 IIeJlMeHb C Nov. 30, 2018, 10:19 a.m. OK GNU C++17 TESTS 47 31 21913600 2000
55553927 chongryong C June 14, 2019, 8:52 a.m. OK GNU C++17 TESTS 47 46 14643200 2000
54336398 amangupta87 C May 18, 2019, 8:19 a.m. OK GNU C++17 TESTS 47 46 15667200 2000
50468414 Stroustrup C Feb. 24, 2019, 9:31 p.m. OK GNU C++17 TESTS 47 46 17920000 2000
48293349 sraman915 C Jan. 12, 2019, 1:35 p.m. OK GNU C++17 TESTS 47 46 18432000 2000
68864581 DetectivePeralta C Jan. 15, 2020, 1:10 p.m. OK GNU C++17 TESTS 47 46 18534400 2000
47294147 sochta_hun C Dec. 20, 2018, 11:04 a.m. OK GNU C++17 TESTS 47 46 18841600 2000
5683849 nikunjbanka C Jan. 13, 2014, 12:57 p.m. OK Java 6 TESTS 47 109 19046400 2000
5497561 alibaba C Dec. 23, 2013, 3:18 p.m. OK Java 6 TESTS 47 109 19148800 2000
6863197 shashank201101193 C June 11, 2014, 9 a.m. OK Java 6 TESTS 47 124 22220800 2000
8830112 dreamstring C Nov. 24, 2014, 1:41 a.m. OK Java 6 TESTS 47 140 19148800 2000
8274684 islam-al-aarag C Oct. 17, 2014, 12:57 a.m. OK Java 6 TESTS 47 140 22220800 2000
8830128 dreamstring C Nov. 24, 2014, 1:46 a.m. OK Java 6 TESTS 47 140 32051200 2000
5489041 SanekM C Dec. 21, 2013, 8:53 p.m. OK Java 6 TESTS 47 265 68915200 2000
5466576 yunoac C Dec. 18, 2013, 4:50 p.m. OK Java 6 TESTS 47 452 87244800 2000
5467823 DiegoAE C Dec. 18, 2013, 5:11 p.m. OK Java 6 TESTS 47 592 197222400 2000
5496825 ikea0064 C Dec. 23, 2013, 11:38 a.m. OK Java 6 TESTS 47 624 219750400 2000
5639830 asinkevich C Jan. 8, 2014, 9:07 p.m. OK Java 7 TESTS 47 93 19046400 2000
5858236 spandey128 C Jan. 31, 2014, 5:14 p.m. OK Java 7 TESTS 47 109 18944000 2000
5705455 OKA_1010 C Jan. 16, 2014, 9:16 p.m. OK Java 7 TESTS 47 109 19148800 2000
5470695 alexey.kasatkin C Dec. 18, 2013, 8:25 p.m. OK Java 7 TESTS 47 109 38297600 2000
6051038 0p9o8i C March 17, 2014, 12:20 a.m. OK Java 7 TESTS 47 124 18944000 2000
5465025 sweiss C Dec. 18, 2013, 4:26 p.m. OK Java 7 TESTS 47 124 19046400 2000
5602639 iovesnov C Jan. 2, 2014, 7:26 a.m. OK Java 7 TESTS 47 140 15872000 2000
5469591 FattyPenguin C Dec. 18, 2013, 6:13 p.m. OK Java 7 TESTS 47 140 19046400 2000
5604627 xenoslash C Jan. 2, 2014, 1:31 p.m. OK Java 7 TESTS 47 140 19251200 2000
5485464 KNIGHT0X300 C Dec. 21, 2013, 7:04 a.m. OK Java 7 TESTS 47 140 25395200 2000
62861765 Shady51 C Oct. 18, 2019, 11:02 a.m. OK Java 8 TESTS 47 140 31232000 2000
62861991 Shady51 C Oct. 18, 2019, 11:06 a.m. OK Java 8 TESTS 47 155 27033600 2000
30385501 MostafaAbdullah C Sept. 16, 2017, 2:31 p.m. OK Java 8 TESTS 47 155 28672000 2000
50288050 mandark27 C Feb. 21, 2019, 3:56 p.m. OK Java 8 TESTS 47 155 35737600 2000
46002480 Laboon C Nov. 20, 2018, 3:11 p.m. OK Java 8 TESTS 47 171 20582400 2000
25197637 pitfall C March 3, 2017, 10:23 p.m. OK Java 8 TESTS 47 171 33280000 2000
20139391 I_Need_Alex_R_Coleman C Aug. 24, 2016, 11:16 p.m. OK Java 8 TESTS 47 171 44646400 2000
26332151 donli C April 13, 2017, 6:49 a.m. OK Java 8 TESTS 47 171 53145600 2000
27909473 pencilman C June 19, 2017, 5:07 p.m. OK Java 8 TESTS 47 186 23552000 2000
55238134 Hoda_Hisham C June 7, 2019, 9:27 a.m. OK Java 8 TESTS 47 187 23961600 2000
10522859 azukun C March 30, 2015, 8:57 a.m. OK MS C# TESTS 47 93 18944000 2000
10522590 azukun C March 30, 2015, 8:13 a.m. OK MS C# TESTS 47 93 78643200 2000
5522519 marshmallow C Dec. 26, 2013, 4:16 a.m. OK MS C# TESTS 47 109 53350400 2000
26800865 og.kostya C May 2, 2017, 11:23 a.m. OK MS C# TESTS 47 998 104857600 2000
5567216 fungi C Dec. 30, 2013, 7:48 a.m. OK MS C++ TESTS 47 31 12083200 2000
5567254 fungi C Dec. 30, 2013, 7:53 a.m. OK MS C++ TESTS 47 31 12902400 2000
5567233 fungi C Dec. 30, 2013, 7:50 a.m. OK MS C++ TESTS 47 31 12902400 2000
7548687 Sehnsucht C Aug. 22, 2014, 4:58 a.m. OK MS C++ TESTS 47 31 13107200 2000
6331333 Vlad_kv C April 12, 2014, 8:08 a.m. OK MS C++ TESTS 47 31 13107200 2000
5468565 CleRIC C Dec. 18, 2013, 5:23 p.m. OK MS C++ TESTS 47 31 13721600 2000
10394378 besher C March 22, 2015, 7:30 a.m. OK MS C++ TESTS 47 31 13926400 2000
5519096 ymwneu C Dec. 25, 2013, 1:17 p.m. OK MS C++ TESTS 47 31 13926400 2000
5472772 1106100011 C Dec. 19, 2013, 5:24 a.m. OK MS C++ TESTS 47 31 14848000 2000
5466308 GeKa C Dec. 18, 2013, 4:46 p.m. OK MS C++ TESTS 47 31 15052800 2000
59412960 yorky C Aug. 24, 2019, 4:42 p.m. OK MS C++ 2017 TESTS 47 186 32358400 2000
35862758 ______u______ C March 2, 2018, 10:31 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
35862555 ______n______ C March 2, 2018, 10:27 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
35862127 _____i_____ C March 2, 2018, 10:18 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
35862052 _____k_____ C March 2, 2018, 10:16 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
35859023 ______k______ C March 2, 2018, 9:12 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
35859016 ______h______ C March 2, 2018, 9:12 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
35858497 ______i______ C March 2, 2018, 9 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
35856711 ______M______ C March 2, 2018, 8:27 p.m. OK PyPy 3 TESTS 47 686 91852800 2000
37608577 nowyyz C April 25, 2018, 6:06 p.m. OK PyPy 3 TESTS 47 701 93081600 2000
33505745 yugle7 C Dec. 22, 2017, 11:56 a.m. OK PyPy 3 TESTS 47 732 99430400 2000
5481720 limed C Dec. 20, 2013, 3:52 p.m. OK Scala TESTS 47 873 228556800 2000
5481927 limed C Dec. 20, 2013, 4:32 p.m. OK Scala TESTS 47 904 228454400 2000
5481919 limed C Dec. 20, 2013, 4:31 p.m. OK Scala TESTS 47 904 228454400 2000
5481672 limed C Dec. 20, 2013, 3:42 p.m. OK Scala TESTS 47 936 235929600 2000
5481904 limed C Dec. 20, 2013, 4:28 p.m. OK Scala TESTS 47 951 228249600 2000
5481730 limed C Dec. 20, 2013, 3:53 p.m. OK Scala TESTS 47 951 228556800 2000
5481699 limed C Dec. 20, 2013, 3:47 p.m. OK Scala TESTS 47 951 228556800 2000

remove filters

Back to search problems