Codeforces Round 385 (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
745 Codeforces Round 385 (Div. 2) FINISHED False 7200 249830699 Dec. 17, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3746 ) B Hongcow Solves A Puzzle PROGRAMMING implementation 1400

B'Hongcow likes solving puzzles. One day, Hongcow finds two identical puzzle pieces, with the instructions "make a rectangle" next to them. The pieces can be described by an n by m grid of characters, where the character 'X ' denotes a part of the puzzle and '. ' denotes an empty part of the grid. It is guaranteed that the puzzle pieces are one 4-connected piece. See the input format and samples for the exact details on how a jigsaw piece will be specified. The puzzle pieces are very heavy, so Hongcow cannot rotate or flip the puzzle pieces. However, he is allowed to move them in any directions. The puzzle pieces also cannot overlap. You are given as input the description of one of the pieces. Determine if it is possible to make a rectangle from two identical copies of the given input. The rectangle should be solid, i.e. there should be no empty holes inside it or on its border. Keep in mind that Hongcow is not allowed to flip or rotate pieces and they cannot overlap, i.e. no two 'X ' from different pieces can share the same position. The first line of input will contain 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 x89500), the dimensions of the puzzle piece. The next n lines will describe the jigsaw piece. Each line will have length m and will consist of characters '. ' and 'X ' only. 'X ' corresponds to a part of the puzzle piece, '. ' is an empty space. It is guaranteed there is at least one 'X ' character in the input and that the 'X ' characters form a 4-connected region. Output "YES" if it is possible for Hongcow to make a rectangle. Output "NO" otherwise. For the first sample, one example of a rectangle we can form is as follows For the second sample, it is impossible to put two of those pieces without rotating or flipping to form a rectangle. In the third sample, we can shift the first tile by one to the right, and then compose the following rectangle: '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
23058066 StarScreamOwl B Dec. 17, 2016, 5:03 p.m. OK Delphi TESTS 77 15 3072000 1400
23059784 MrLolthe1st B Dec. 17, 2016, 5:12 p.m. OK Delphi TESTS 77 31 2867200 1400
23060766 EugenePilipenko B Dec. 17, 2016, 5:18 p.m. OK Delphi TESTS 77 31 3584000 1400
23056923 ruban B Dec. 17, 2016, 4:56 p.m. OK Delphi TESTS 77 31 6553600 1400
23060752 Maruusha B Dec. 17, 2016, 5:18 p.m. OK FPC TESTS 77 15 2457600 1400
23177873 bzh B Dec. 20, 2016, 1:39 p.m. OK FPC TESTS 77 15 2764800 1400
23060938 ultoxtung B Dec. 17, 2016, 5:19 p.m. OK FPC TESTS 77 15 2867200 1400
23069776 ngattaro1 B Dec. 17, 2016, 6:27 p.m. OK FPC TESTS 77 15 2969600 1400
23070900 alavrov B Dec. 17, 2016, 6:34 p.m. OK FPC TESTS 77 15 2969600 1400
23062554 PAG B Dec. 17, 2016, 5:30 p.m. OK FPC TESTS 77 15 2969600 1400
23070796 KiberGraf B Dec. 17, 2016, 6:33 p.m. OK FPC TESTS 77 15 3481600 1400
23058234 -_ALTYN_- B Dec. 17, 2016, 5:04 p.m. OK FPC TESTS 77 15 3481600 1400
23059786 OlegMankevich B Dec. 17, 2016, 5:12 p.m. OK FPC TESTS 77 15 3891200 1400
23057817 Highsenberg B Dec. 17, 2016, 5:02 p.m. OK FPC TESTS 77 15 3891200 1400
23077650 SakibAbrar B Dec. 18, 2016, 5:54 a.m. OK GNU C TESTS 77 15 204800 1400
23059718 CloudStrife B Dec. 17, 2016, 5:12 p.m. OK GNU C TESTS 77 15 1843200 1400
23065149 avinash_47 B Dec. 17, 2016, 5:49 p.m. OK GNU C TESTS 77 15 2150400 1400
24283944 vjudge4 B Jan. 31, 2017, 7:31 a.m. OK GNU C TESTS 77 15 2150400 1400
23063932 xxyyttxx B Dec. 17, 2016, 5:40 p.m. OK GNU C TESTS 77 15 2150400 1400
23061463 bijelicb B Dec. 17, 2016, 5:23 p.m. OK GNU C TESTS 77 15 2150400 1400
23195910 vjudge4 B Dec. 21, 2016, 9:58 a.m. OK GNU C TESTS 77 15 2867200 1400
25351973 KinKong1 B March 9, 2017, 1:33 a.m. OK GNU C TESTS 77 30 2150400 1400
23063817 rainboy B Dec. 17, 2016, 5:39 p.m. OK GNU C TESTS 77 30 2150400 1400
23064907 Kolyanus B Dec. 17, 2016, 5:47 p.m. OK GNU C TESTS 77 31 2150400 1400
23076749 hanylch B Dec. 18, 2016, 4:18 a.m. OK GNU C++ TESTS 77 15 102400 1400
32221735 vjudge4 B Nov. 11, 2017, 2:14 p.m. OK GNU C++ TESTS 77 15 204800 1400
27582578 vjudge5 B June 5, 2017, 12:19 p.m. OK GNU C++ TESTS 77 15 204800 1400
27042021 return007 B May 11, 2017, 8:51 p.m. OK GNU C++ TESTS 77 15 204800 1400
23075872 NewIdea B Dec. 18, 2016, 2:46 a.m. OK GNU C++ TESTS 77 15 204800 1400
31829858 Scut82 B Oct. 28, 2017, 8:56 a.m. OK GNU C++ TESTS 77 15 307200 1400
29828241 LL579 B Aug. 27, 2017, 2:11 p.m. OK GNU C++ TESTS 77 15 307200 1400
29516130 vjudge3 B Aug. 17, 2017, 1:50 a.m. OK GNU C++ TESTS 77 15 307200 1400
27581939 vjudge4 B June 5, 2017, 11:40 a.m. OK GNU C++ TESTS 77 15 307200 1400
23081148 vjudge2 B Dec. 18, 2016, 9:48 a.m. OK GNU C++ TESTS 77 15 307200 1400
26677625 Vin_Dizel C_Logger B April 26, 2017, 7:41 a.m. OK GNU C11 TESTS 77 15 2150400 1400
23064059 grk62 B Dec. 17, 2016, 5:41 p.m. OK GNU C11 TESTS 77 15 2150400 1400
23195160 vjudge5 B Dec. 21, 2016, 9:18 a.m. OK GNU C11 TESTS 77 15 2150400 1400
23201479 vjudge2 B Dec. 21, 2016, 2:27 p.m. OK GNU C11 TESTS 77 15 3174400 1400
62321127 karan984 B Oct. 10, 2019, 4:47 p.m. OK GNU C11 TESTS 77 31 204800 1400
47675935 xucanxx B Dec. 29, 2018, 9:07 a.m. OK GNU C11 TESTS 77 31 307200 1400
63850740 kaiboy B Oct. 30, 2019, 3:39 p.m. OK GNU C11 TESTS 77 31 307200 1400
23065603 0101-1001 B Dec. 17, 2016, 5:52 p.m. OK GNU C11 TESTS 77 31 4915200 1400
23077059 y_shindoh B Dec. 18, 2016, 4:55 a.m. OK GNU C++11 TESTS 77 15 0 1400
23075818 eddy1021 B Dec. 18, 2016, 2:37 a.m. OK GNU C++11 TESTS 77 15 0 1400
23077995 yamidark B Dec. 18, 2016, 6:20 a.m. OK GNU C++11 TESTS 77 15 0 1400
23076756 LmnGz B Dec. 18, 2016, 4:19 a.m. OK GNU C++11 TESTS 77 15 102400 1400
29517716 GyojunYoun B Aug. 17, 2017, 4:32 a.m. OK GNU C++11 TESTS 77 15 307200 1400
30823167 minson123 B Sept. 29, 2017, 8:05 a.m. OK GNU C++11 TESTS 77 15 307200 1400
29721780 handoku B Aug. 24, 2017, 4:17 a.m. OK GNU C++11 TESTS 77 15 307200 1400
27102196 suyujie B May 14, 2017, 7:20 a.m. OK GNU C++11 TESTS 77 15 307200 1400
23080285 pedrohlf B Dec. 18, 2016, 8:51 a.m. OK GNU C++11 TESTS 77 15 307200 1400
23079627 tocolor B Dec. 18, 2016, 8:12 a.m. OK GNU C++11 TESTS 77 15 307200 1400
23076772 trollbebo B Dec. 18, 2016, 4:21 a.m. OK GNU C++14 TESTS 77 15 0 1400
23073804 Benq B Dec. 17, 2016, 10:18 p.m. OK GNU C++14 TESTS 77 15 0 1400
23080453 Srantik_22 B Dec. 18, 2016, 9 a.m. OK GNU C++14 TESTS 77 15 0 1400
23076175 pr0grammer B Dec. 18, 2016, 3:20 a.m. OK GNU C++14 TESTS 77 15 204800 1400
23073775 Solve_Every_Where B Dec. 17, 2016, 10:16 p.m. OK GNU C++14 TESTS 77 15 204800 1400
23076394 netflix B Dec. 18, 2016, 3:42 a.m. OK GNU C++14 TESTS 77 15 204800 1400
23078287 pappu112 B Dec. 18, 2016, 6:44 a.m. OK GNU C++14 TESTS 77 15 204800 1400
23078316 Askha B Dec. 18, 2016, 6:46 a.m. OK GNU C++14 TESTS 77 15 204800 1400
23079007 harshit23897 B Dec. 18, 2016, 7:29 a.m. OK GNU C++14 TESTS 77 15 204800 1400
29698940 Max.D. B Aug. 23, 2017, 6:15 a.m. OK GNU C++14 TESTS 77 15 204800 1400
40368532 vjudge4 B July 15, 2018, 7:05 a.m. OK GNU C++17 TESTS 77 30 307200 1400
61899462 k24 B Oct. 5, 2019, 8:12 a.m. OK GNU C++17 TESTS 77 31 0 1400
63747754 ak532 B Oct. 29, 2019, 7:04 p.m. OK GNU C++17 TESTS 77 31 204800 1400
55714932 spaesk B June 18, 2019, 12:13 p.m. OK GNU C++17 TESTS 77 31 204800 1400
56991799 parammodi2281 B July 13, 2019, 6:45 p.m. OK GNU C++17 TESTS 77 31 204800 1400
50050145 charity B Feb. 17, 2019, 7:47 a.m. OK GNU C++17 TESTS 77 31 204800 1400
42811725 keysersoze B Sept. 12, 2018, 8:36 p.m. OK GNU C++17 TESTS 77 31 204800 1400
53961581 trungvthe130284 B May 10, 2019, 2:31 p.m. OK GNU C++17 TESTS 77 31 307200 1400
40368491 vjudge5 B July 15, 2018, 7:03 a.m. OK GNU C++17 TESTS 77 31 307200 1400
46429807 yizhibaiwuya B Dec. 1, 2018, 4:35 a.m. OK GNU C++17 TESTS 77 31 307200 1400
23066262 metanoid B Dec. 17, 2016, 5:57 p.m. OK Go TESTS 77 15 23040000 1400
23062948 Mr.Kutso B Dec. 17, 2016, 5:33 p.m. OK Go TESTS 77 31 23040000 1400
23061321 PugachAG B Dec. 17, 2016, 5:22 p.m. OK Go TESTS 77 77 32972800 1400
23058132 Nesze B Dec. 17, 2016, 5:03 p.m. OK Go TESTS 77 530 23040000 1400
23055339 torus711 B Dec. 17, 2016, 4:48 p.m. OK Haskell TESTS 77 46 57651200 1400
23822993 exentropy B Jan. 14, 2017, 9:04 p.m. OK Haskell TESTS 77 46 57651200 1400
23064609 ak464tnok B Dec. 17, 2016, 5:45 p.m. OK Haskell TESTS 77 93 54374400 1400
23056729 Megabyte B Dec. 17, 2016, 4:55 p.m. OK Java 8 TESTS 77 109 20275200 1400
26469238 mynameischarlie B April 18, 2017, 5:43 a.m. OK Java 8 TESTS 77 109 20582400 1400
25351910 KinKong1 B March 9, 2017, 1:26 a.m. OK Java 8 TESTS 77 109 20582400 1400
23132160 poikniok B Dec. 19, 2016, 7:27 a.m. OK Java 8 TESTS 77 109 20582400 1400
23067777 AdelX B Dec. 17, 2016, 6:10 p.m. OK Java 8 TESTS 77 109 20582400 1400
23062468 Carson B Dec. 17, 2016, 5:30 p.m. OK Java 8 TESTS 77 109 20582400 1400
23060457 sreedish B Dec. 17, 2016, 5:16 p.m. OK Java 8 TESTS 77 109 20582400 1400
23057849 postyreal B Dec. 17, 2016, 5:02 p.m. OK Java 8 TESTS 77 109 20582400 1400
23057238 franzks B Dec. 17, 2016, 4:58 p.m. OK Java 8 TESTS 77 109 20582400 1400
23054561 kilospazz B Dec. 17, 2016, 4:45 p.m. OK Java 8 TESTS 77 109 20582400 1400
23073597 leonidvasilyev B Dec. 17, 2016, 10:01 p.m. OK JavaScript TESTS 77 31 307200 1400
23057251 bintree B Dec. 17, 2016, 4:58 p.m. OK Kotlin TESTS 77 155 21504000 1400
23059917 kuuso B Dec. 17, 2016, 5:13 p.m. OK Mono C# TESTS 77 62 10342400 1400
23061202 inna B Dec. 17, 2016, 5:21 p.m. OK Mono C# TESTS 77 62 10752000 1400
68077754 hibatibati B Jan. 2, 2020, 1:15 p.m. OK Mono C# TESTS 77 77 3276800 1400
23058055 renadeen B Dec. 17, 2016, 5:03 p.m. OK MS C# TESTS 77 46 10035200 1400
23070145 mircea85 B Dec. 17, 2016, 6:29 p.m. OK MS C# TESTS 77 46 11059200 1400
23143108 og.kostya B Dec. 19, 2016, 4:11 p.m. OK MS C# TESTS 77 61 9830400 1400
23772698 serrg B Jan. 12, 2017, 11:15 p.m. OK MS C# TESTS 77 61 10956800 1400
23072700 rassvetik B Dec. 17, 2016, 9:07 p.m. OK MS C# TESTS 77 62 2252800 1400
23055243 T-D-K B Dec. 17, 2016, 4:47 p.m. OK MS C# TESTS 77 62 9932800 1400
23070172 Geen B Dec. 17, 2016, 6:29 p.m. OK MS C# TESTS 77 62 10035200 1400
23064178 zazak B Dec. 17, 2016, 5:41 p.m. OK MS C# TESTS 77 62 10342400 1400
23057571 artsin666 B Dec. 17, 2016, 5 p.m. OK MS C# TESTS 77 62 10547200 1400
23068510 Alexit B Dec. 17, 2016, 6:17 p.m. OK MS C# TESTS 77 62 10547200 1400
23080304 receed B Dec. 18, 2016, 8:52 a.m. OK MS C++ TESTS 77 15 307200 1400
23080935 Omarjh B Dec. 18, 2016, 9:32 a.m. OK MS C++ TESTS 77 15 614400 1400
23072211 Dmit_riy B Dec. 17, 2016, 8:50 p.m. OK MS C++ TESTS 77 15 2048000 1400
23067920 plsac B Dec. 17, 2016, 6:11 p.m. OK MS C++ TESTS 77 15 2048000 1400
23216852 swust5120154253 B Dec. 22, 2016, 4 a.m. OK MS C++ TESTS 77 15 2048000 1400
24957380 waterD B Feb. 24, 2017, 7:24 a.m. OK MS C++ TESTS 77 15 2355200 1400
25349743 AbedAbuhijleh B March 8, 2017, 8:56 p.m. OK MS C++ TESTS 77 15 2355200 1400
24870696 Ally0729 B Feb. 21, 2017, 12:18 p.m. OK MS C++ TESTS 77 15 2355200 1400
24620162 scorpiowf B Feb. 13, 2017, 3:03 a.m. OK MS C++ TESTS 77 15 2355200 1400
24458195 harshini1998 B Feb. 5, 2017, 7:31 p.m. OK MS C++ TESTS 77 15 2355200 1400
64871430 Mad112233 B Nov. 14, 2019, 8:18 a.m. OK MS C++ 2017 TESTS 77 31 307200 1400
64872108 Mad112233 B Nov. 14, 2019, 8:31 a.m. OK MS C++ 2017 TESTS 77 31 307200 1400
23245222 s_p B Dec. 23, 2016, 10:37 a.m. OK Perl TESTS 77 30 3379200 1400
24105627 mayakin B Jan. 25, 2017, 6:40 a.m. OK PHP TESTS 77 77 15974400 1400
23104402 Yash_ B Dec. 18, 2016, 1:17 p.m. OK PyPy 2 TESTS 77 77 22016000 1400
23170290 nealzane B Dec. 20, 2016, 5:44 a.m. OK PyPy 2 TESTS 77 78 22118400 1400
23078636 masonsbro B Dec. 18, 2016, 7:08 a.m. OK PyPy 2 TESTS 77 109 1228800 1400
23059210 Ferume B Dec. 17, 2016, 5:09 p.m. OK PyPy 2 TESTS 77 124 27648000 1400
56407538 raj1307 B July 1, 2019, 8:22 p.m. OK PyPy 2 TESTS 77 140 6246400 1400
23217156 Eeyore B Dec. 22, 2016, 4:33 a.m. OK PyPy 2 TESTS 77 156 22835200 1400
23058929 minecraftyugi B Dec. 17, 2016, 5:08 p.m. OK PyPy 2 TESTS 77 187 36864000 1400
23116790 thepotatoranch B Dec. 19, 2016, 12:03 a.m. OK PyPy 2 TESTS 77 483 23552000 1400
23072161 cugel B Dec. 17, 2016, 8:49 p.m. OK PyPy 3 TESTS 77 124 23961600 1400
23076158 clarinet758 B Dec. 18, 2016, 3:19 a.m. OK PyPy 3 TESTS 77 140 1126400 1400
23549338 clarinet758 B Jan. 5, 2017, 7:02 a.m. OK PyPy 3 TESTS 77 140 24166400 1400
23054742 SirNickolas B Dec. 17, 2016, 4:45 p.m. OK PyPy 3 TESTS 77 155 24064000 1400
23364277 Vosatorp B Dec. 27, 2016, 5:40 p.m. OK PyPy 3 TESTS 77 155 26009600 1400
58350893 PrateekAgnihotri B Aug. 5, 2019, 5:07 p.m. OK PyPy 3 TESTS 77 171 2969600 1400
64858559 kchau B Nov. 14, 2019, 1:25 a.m. OK PyPy 3 TESTS 77 186 7372800 1400
35725279 laoliumang B Feb. 26, 2018, 8:47 a.m. OK Python 2 TESTS 77 62 4812800 1400
23067579 Fayaz B Dec. 17, 2016, 6:09 p.m. OK Python 2 TESTS 77 77 4915200 1400
23063577 shade33 B Dec. 17, 2016, 5:37 p.m. OK Python 2 TESTS 77 77 4915200 1400
23062943 relaxneko B Dec. 17, 2016, 5:33 p.m. OK Python 2 TESTS 77 77 5939200 1400
23925565 NyaQ B Jan. 18, 2017, 3:22 p.m. OK Python 2 TESTS 77 78 4710400 1400
23187712 yeech B Dec. 20, 2016, 9:27 p.m. OK Python 2 TESTS 77 78 4812800 1400
23060807 wa1 B Dec. 17, 2016, 5:19 p.m. OK Python 2 TESTS 77 78 4915200 1400
23060864 NicolasK B Dec. 17, 2016, 5:19 p.m. OK Python 2 TESTS 77 93 5324800 1400
28657604 queragion2726 B July 18, 2017, 6:07 a.m. OK Python 2 TESTS 77 108 5222400 1400
23066554 mohammad-aa B Dec. 17, 2016, 6 p.m. OK Python 2 TESTS 77 124 4915200 1400
32141765 yugle7 B Nov. 8, 2017, 2:28 p.m. OK Python 3 TESTS 77 62 409600 1400
27388033 thelastprime B May 27, 2017, 12:38 p.m. OK Python 3 TESTS 77 62 409600 1400
30856806 Qumeric B Sept. 30, 2017, 6:47 a.m. OK Python 3 TESTS 77 62 614400 1400
23066321 Levine B Dec. 17, 2016, 5:58 p.m. OK Python 3 TESTS 77 62 4608000 1400
23059981 yinxiaoyu B Dec. 17, 2016, 5:13 p.m. OK Python 3 TESTS 77 62 4608000 1400
23057898 uppi B Dec. 17, 2016, 5:02 p.m. OK Python 3 TESTS 77 62 4608000 1400
23056529 Mr_Suworow B Dec. 17, 2016, 4:54 p.m. OK Python 3 TESTS 77 62 4608000 1400
23056483 yellow_mango B Dec. 17, 2016, 4:54 p.m. OK Python 3 TESTS 77 62 4608000 1400
23072374 Maxim.Greek B Dec. 17, 2016, 8:54 p.m. OK Python 3 TESTS 77 62 5120000 1400
23055375 LordVoldebug B Dec. 17, 2016, 4:48 p.m. OK Python 3 TESTS 77 62 5222400 1400
23239263 hogeover30 B Dec. 23, 2016, 3:18 a.m. OK Ruby TESTS 77 93 6860800 1400
23232034 hogeover30 B Dec. 22, 2016, 6:25 p.m. OK Ruby TESTS 77 93 7065600 1400
23238873 hogeover30 B Dec. 23, 2016, 2:26 a.m. OK Ruby TESTS 77 109 6860800 1400
23056966 cookies146 B Dec. 17, 2016, 4:56 p.m. OK Ruby TESTS 77 140 7168000 1400
23060018 Ramadoka. B Dec. 17, 2016, 5:14 p.m. OK Ruby TESTS 77 467 66662400 1400
24469501 mio_h B Feb. 6, 2017, 1:48 p.m. OK Rust TESTS 77 30 18636800 1400
23070214 Andrew.Tweddle B Dec. 17, 2016, 6:30 p.m. OK Scala TESTS 77 280 23654400 1400
23056319 wrick B Dec. 17, 2016, 4:53 p.m. OK Scala TESTS 77 342 23756800 1400

remove filters

Back to search problems