Codeforces Round 567 (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
1181 Codeforces Round 567 (Div. 2) FINISHED False 7200 171145499 June 16, 2019, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3155 ) C Flag PROGRAMMING brute force combinatorics dp implementation 1900

B"Innokenty works at a flea market and sells some random stuff rare items. Recently he found an old rectangular blanket. It turned out that the blanket is split in n cdot m colored pieces that form a rectangle with n rows and m columns. The colored pieces attracted Innokenty's attention so he immediately came up with the following business plan. If he cuts out a subrectangle consisting of three colored stripes, he can sell it as a flag of some country. Innokenty decided that a subrectangle is similar enough to a flag of some country if it consists of three stripes of equal heights placed one above another, where each stripe consists of cells of equal color. Of course, the color of the top stripe must be different from the color of the middle stripe; and the color of the middle stripe must be different from the color of the bottom stripe. Innokenty has not yet decided what part he will cut out, but he is sure that the flag's boundaries should go along grid lines. Also, Innokenty won't rotate the blanket. Please help Innokenty and count the number of different subrectangles Innokenty can cut out and sell as a flag. Two subrectangles located in different places but forming the same flag are still considered different. These subrectangles are flags. These subrectangles are not flags. The first line contains two integers n and m ( 1 <= n, m <= 1 ,000 ) -- the number of rows and the number of columns on the blanket. Each of the next n lines contains m lowercase English letters from 'a' to 'z' and describes a row of the blanket. Equal letters correspond to equal colors, different letters correspond to different colors. In the only line print the number of subrectangles which form valid flags. The selected subrectangles are flags in the first example. "...

Tutorials

Editorial of Codeforces Round #567 (based on All-Russian olympiad in the name of Keldysh)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55645624 jiangly C June 16, 2019, 12:11 p.m. OK Clang++17 Diagnostics TESTS 23 155 3379200 1900
55715721 denkora C June 18, 2019, 12:36 p.m. OK Clang++17 Diagnostics TESTS 23 639 1228800 1900
68284534 rr_ C Jan. 5, 2020, 6 p.m. OK D TESTS 23 62 22323200 1900
55639752 xcodevn C June 16, 2019, 11:10 a.m. OK D TESTS 23 155 36659200 1900
55682085 AutumnKite C June 17, 2019, 1:35 p.m. OK GNU C++11 TESTS 23 31 819200 1900
55636279 Torta C June 16, 2019, 10:49 a.m. OK GNU C++11 TESTS 23 31 1024000 1900
62658308 luogu_bot3 C Oct. 16, 2019, 3:43 a.m. OK GNU C++11 TESTS 23 31 4915200 1900
57017388 luogu_bot5 C July 14, 2019, 12:17 p.m. OK GNU C++11 TESTS 23 31 4915200 1900
55633532 sunshine_chen C June 16, 2019, 10:34 a.m. OK GNU C++11 TESTS 23 31 4915200 1900
55680967 luogu_bot2 C June 17, 2019, 1:01 p.m. OK GNU C++11 TESTS 23 31 5017600 1900
66160961 liuweih C Dec. 2, 2019, 4:24 a.m. OK GNU C++11 TESTS 23 31 5120000 1900
63122901 KING_LRL C Oct. 22, 2019, 11:54 a.m. OK GNU C++11 TESTS 23 31 5120000 1900
63120536 luogu_bot2 C Oct. 22, 2019, 11:03 a.m. OK GNU C++11 TESTS 23 31 5120000 1900
61303347 Golden_miner C Sept. 26, 2019, 6:06 a.m. OK GNU C++11 TESTS 23 31 5120000 1900
55690778 dunjen_master C June 17, 2019, 6:04 p.m. OK GNU C++14 TESTS 23 30 5120000 1900
55640454 paras_08 C June 16, 2019, 11:14 a.m. OK GNU C++14 TESTS 23 30 6246400 1900
56611114 mayiyang C July 6, 2019, 7:20 a.m. OK GNU C++14 TESTS 23 30 9113600 1900
55680609 KISH_PATEL C June 17, 2019, 12:51 p.m. OK GNU C++14 TESTS 23 31 0 1900
55718924 ytriayggg C June 18, 2019, 2:12 p.m. OK GNU C++14 TESTS 23 31 1024000 1900
55658467 Lagrang3 C June 16, 2019, 6:56 p.m. OK GNU C++14 TESTS 23 31 1945600 1900
56235530 mig C June 28, 2019, 4:04 p.m. OK GNU C++14 TESTS 23 31 2969600 1900
55686318 Mksiyak C June 17, 2019, 3:40 p.m. OK GNU C++14 TESTS 23 31 5017600 1900
55642836 dinesh_1997 C June 16, 2019, 11:29 a.m. OK GNU C++14 TESTS 23 31 5017600 1900
58804973 tianyan C Aug. 14, 2019, 8:36 a.m. OK GNU C++14 TESTS 23 31 5120000 1900
55701170 GilgameshArcher C June 18, 2019, 4:18 a.m. OK GNU C++17 TESTS 23 31 0 1900
57118631 teja_sayya8 C July 15, 2019, 10:27 p.m. OK GNU C++17 TESTS 23 31 1024000 1900
55715826 denkora C June 18, 2019, 12:39 p.m. OK GNU C++17 TESTS 23 31 1024000 1900
55707753 Rick1 C June 18, 2019, 8:33 a.m. OK GNU C++17 TESTS 23 31 1024000 1900
55681152 Rick1 C June 17, 2019, 1:07 p.m. OK GNU C++17 TESTS 23 31 1024000 1900
55670476 wjyyy C June 17, 2019, 7:16 a.m. OK GNU C++17 TESTS 23 31 1024000 1900
55640085 wjyyy C June 16, 2019, 11:12 a.m. OK GNU C++17 TESTS 23 31 1024000 1900
55645910 balalaika C June 16, 2019, 12:16 p.m. OK GNU C++17 TESTS 23 31 2048000 1900
55641386 Lrztxdy C June 16, 2019, 11:20 a.m. OK GNU C++17 TESTS 23 31 2048000 1900
66788898 happy_ C Dec. 13, 2019, 2:35 p.m. OK GNU C++17 TESTS 23 31 5017600 1900
67386082 bleh0.5 C Dec. 21, 2019, 5:52 p.m. OK Java 11 TESTS 23 218 6246400 1900
64360415 IslamTalipovTop C Nov. 6, 2019, 11:33 a.m. OK Java 11 TESTS 23 358 58163200 1900
55651302 tmwilliamlin168 C June 16, 2019, 2:42 p.m. OK Java 8 TESTS 23 139 4608000 1900
55633882 toshihoge C June 16, 2019, 10:36 a.m. OK Java 8 TESTS 23 139 4608000 1900
60909946 dtsarun C Sept. 20, 2019, 5:18 a.m. OK Java 8 TESTS 23 140 0 1900
56436829 --- C July 2, 2019, 2:31 p.m. OK Java 8 TESTS 23 140 0 1900
56053154 kusomushi C June 25, 2019, 8:34 p.m. OK Java 8 TESTS 23 140 4608000 1900
55832646 paramvirsingh1 C June 20, 2019, 1:53 p.m. OK Java 8 TESTS 23 140 4608000 1900
55873248 KharYusuf C June 21, 2019, 4:11 p.m. OK Java 8 TESTS 23 140 5427200 1900
57920142 7dan C July 29, 2019, 4:16 a.m. OK Java 8 TESTS 23 140 16281600 1900
55644820 armking C June 16, 2019, 11:59 a.m. OK Java 8 TESTS 23 140 16896000 1900
56437708 --- C July 2, 2019, 2:54 p.m. OK Java 8 TESTS 23 155 0 1900
55640942 pavlo.liapota C June 16, 2019, 11:17 a.m. OK Kotlin TESTS 23 249 8192000 1900
59441478 Spheniscine C Aug. 25, 2019, 11:24 a.m. OK Kotlin TESTS 23 311 716800 1900
55639496 max_kibble C June 16, 2019, 11:08 a.m. OK Kotlin TESTS 23 358 39321600 1900
59437803 Spheniscine C Aug. 25, 2019, 9:40 a.m. OK Kotlin TESTS 23 405 716800 1900
59428756 Spheniscine C Aug. 25, 2019, 4:55 a.m. OK Kotlin TESTS 23 405 716800 1900
55648845 og.kostya C June 16, 2019, 1:32 p.m. OK Mono C# TESTS 23 77 9011200 1900
62849304 QuantumKnight C Oct. 18, 2019, 6:41 a.m. OK Mono C# TESTS 23 93 19046400 1900
55636110 omikad C June 16, 2019, 10:48 a.m. OK Mono C# TESTS 23 93 20275200 1900
55744431 eki C June 19, 2019, 9:14 a.m. OK Mono C# TESTS 23 265 20070400 1900
55989851 vjudge3 C June 24, 2019, 6:57 a.m. OK MS C++ TESTS 23 31 1024000 1900
55989983 vjudge3 C June 24, 2019, 7:02 a.m. OK MS C++ TESTS 23 31 5017600 1900
57357675 vjudge2 C July 20, 2019, 6:49 a.m. OK MS C++ TESTS 23 46 5120000 1900
58162678 wawahaha C Aug. 2, 2019, 7:59 a.m. OK MS C++ TESTS 23 46 17408000 1900
55641782 grey C June 16, 2019, 11:22 a.m. OK MS C++ TESTS 23 93 5734400 1900
55999026 vjudge5 C June 24, 2019, 12:05 p.m. OK MS C++ TESTS 23 499 80384000 1900
57846976 Prihang C July 27, 2019, 11:36 a.m. OK MS C++ 2017 TESTS 23 31 5120000 1900
57846949 Prihang C July 27, 2019, 11:35 a.m. OK MS C++ 2017 TESTS 23 31 5120000 1900
68927479 wp32pw C Jan. 16, 2020, 10:39 a.m. OK MS C++ 2017 TESTS 23 61 1433600 1900
55636828 Kniaz C June 16, 2019, 10:52 a.m. OK MS C++ 2017 TESTS 23 61 5529600 1900
55720711 bbisnouse C June 18, 2019, 3:08 p.m. OK MS C++ 2017 TESTS 23 61 9113600 1900
55642298 breaknow C June 16, 2019, 11:26 a.m. OK MS C++ 2017 TESTS 23 61 9830400 1900
55642150 GUEEN C June 16, 2019, 11:25 a.m. OK MS C++ 2017 TESTS 23 62 12595200 1900
55638253 R99 C June 16, 2019, 11:01 a.m. OK MS C++ 2017 TESTS 23 62 13004800 1900
55641835 kotamanegi C June 16, 2019, 11:23 a.m. OK MS C++ 2017 TESTS 23 62 17817600 1900
55645978 ielenik C June 16, 2019, 12:18 p.m. OK MS C++ 2017 TESTS 23 93 33996800 1900
55653261 bcollet C June 16, 2019, 3:42 p.m. OK PyPy 2 TESTS 23 218 8294400 1900
55637869 drd93 C June 16, 2019, 10:58 a.m. OK PyPy 2 TESTS 23 311 12083200 1900
55656998 supachai_pay C June 16, 2019, 5:56 p.m. OK PyPy 2 TESTS 23 421 28672000 1900
55634038 astrom.lars C June 16, 2019, 10:37 a.m. OK PyPy 2 TESTS 23 1138 132710400 1900
55640768 pa.n.ik C June 16, 2019, 11:16 a.m. OK PyPy 2 TESTS 23 1590 47411200 1900
55673245 RoflanDaun C June 17, 2019, 8:54 a.m. OK PyPy 3 TESTS 23 311 14950400 1900
55648833 Skybytskyi.Nikita C June 16, 2019, 1:32 p.m. OK PyPy 3 TESTS 23 405 14848000 1900
55637502 algmyr C June 16, 2019, 10:56 a.m. OK PyPy 3 TESTS 23 420 19763200 1900
55922568 codershuvo C June 22, 2019, 8:02 a.m. OK PyPy 3 TESTS 23 436 14540800 1900
55640703 yumtam C June 16, 2019, 11:16 a.m. OK PyPy 3 TESTS 23 452 13824000 1900
55822986 aytel C June 20, 2019, 9:26 a.m. OK PyPy 3 TESTS 23 452 21913600 1900
55785737 newbiecoder123 C June 19, 2019, 4:23 p.m. OK PyPy 3 TESTS 23 483 13619200 1900
56073888 kingofprank C June 26, 2019, 11:54 a.m. OK PyPy 3 TESTS 23 561 40550400 1900
55637574 pineriver C June 16, 2019, 10:57 a.m. OK PyPy 3 TESTS 23 577 70041600 1900
56184286 Pokeylope C June 28, 2019, 3:16 a.m. OK PyPy 3 TESTS 23 732 61030400 1900
55632445 suche5960 C June 16, 2019, 10:28 a.m. OK Python 2 TESTS 23 1497 5529600 1900
55636815 rustaurance C June 16, 2019, 10:52 a.m. OK Rust TESTS 23 93 23347200 1900
55725927 yakamoto C June 18, 2019, 5:44 p.m. OK Scala TESTS 23 452 0 1900

remove filters

Back to search problems