Codeforces Round 402 (Div. 1)

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
778 Codeforces Round 402 (Div. 1) FINISHED False 7200 243726899 Feb. 26, 2017, 8:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 533 ) D Parquet Re-laying PROGRAMMING constructive algorithms 2700

B"Peter decided to lay a parquet in the room of size n xe2 x80 x89 xc3 x97 xe2 x80 x89m, the parquet consists of tiles of size 1 xe2 x80 x89 xc3 x97 xe2 x80 x892. When the workers laid the parquet, it became clear that the tiles pattern looks not like Peter likes, and workers will have to re-lay it. The workers decided that removing entire parquet and then laying it again is very difficult task, so they decided to make such an operation every hour: remove two tiles, which form a 2 xe2 x80 x89 xc3 x97 xe2 x80 x892 square, rotate them 90 degrees and put them back on the same place. They have no idea how to obtain the desired configuration using these operations, and whether it is possible at all. Help Peter to make a plan for the workers or tell that it is impossible. The plan should contain at most 100 xe2 x80 x89000 commands. The first line contains integer n and m, size of the room (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8950). At least one of them is even number. The following n lines contain m characters each, the description of the current configuration of the parquet tiles. Each character represents the position of the half-tile. Characters 'L', 'R', 'U' and 'D' correspond to the left, right, upper and lower halves, respectively. The following n lines contain m characters each, describing the desired configuration in the same format. In the first line output integer k, the number of operations. In the next k lines output description of operations. The operation is specified by coordinates (row and column) of the left upper half-tile on which the operation is performed. If there is no solution, output -1 in the first line. In the first sample test first operation is to rotate two rightmost tiles, after this all tiles lie vertically. Second operation is to rotate two leftmost tiles, after this we will get desired configuration. "...

Tutorials

Codeforces Round #402, Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
25180478 Constantor D March 3, 2017, 3:52 p.m. OK D TESTS 49 31 7168000 2700
25045656 Gassa D Feb. 26, 2017, 9:36 a.m. OK D TESTS 49 31 7168000 2700
31869803 vjudge5 D Oct. 29, 2017, 2:42 p.m. OK GNU C++ TESTS 49 15 409600 2700
27453063 kut_kjb1994 D May 30, 2017, 5:38 p.m. OK GNU C++ TESTS 49 15 409600 2700
27357752 jiyutian D May 26, 2017, 2:31 p.m. OK GNU C++ TESTS 49 15 1433600 2700
27174373 zhan8855 D May 17, 2017, 7:25 a.m. OK GNU C++ TESTS 49 15 1740800 2700
25453650 infinity37 D March 13, 2017, 12:32 p.m. OK GNU C++ TESTS 49 15 2355200 2700
25449777 _ShadowSong D March 13, 2017, 8:49 a.m. OK GNU C++ TESTS 49 15 2355200 2700
25378199 FoolPerson D March 10, 2017, 11:44 a.m. OK GNU C++ TESTS 49 15 2355200 2700
25201395 Mikuri D March 4, 2017, 5:36 a.m. OK GNU C++ TESTS 49 15 2457600 2700
25090864 Dylans D Feb. 28, 2017, 1:19 a.m. OK GNU C++ TESTS 49 15 2457600 2700
25068257 GentleSmile D Feb. 27, 2017, 3:28 a.m. OK GNU C++ TESTS 49 15 2457600 2700
30176427 Suika_predator D Sept. 7, 2017, 8:43 a.m. OK GNU C++11 TESTS 49 15 204800 2700
31921212 vjudge1 D Oct. 31, 2017, 12:39 p.m. OK GNU C++11 TESTS 49 15 409600 2700
27350610 GEOTCBRL D May 26, 2017, 7:37 a.m. OK GNU C++11 TESTS 49 15 409600 2700
31833088 vjudge3 D Oct. 28, 2017, 10:59 a.m. OK GNU C++11 TESTS 49 15 716800 2700
27178917 dogET D May 17, 2017, 12:12 p.m. OK GNU C++11 TESTS 49 15 819200 2700
27351595 Meowww D May 26, 2017, 8:26 a.m. OK GNU C++11 TESTS 49 15 1638400 2700
26249230 ha1vanka D April 10, 2017, 8:22 a.m. OK GNU C++11 TESTS 49 15 2355200 2700
25455319 bruno.iljazovic D March 13, 2017, 1:54 p.m. OK GNU C++11 TESTS 49 15 2355200 2700
25439412 Theodor1000 D March 12, 2017, 4:46 p.m. OK GNU C++11 TESTS 49 15 2355200 2700
25054270 spatarel D Feb. 26, 2017, 12:37 p.m. OK GNU C++11 TESTS 49 15 2355200 2700
31924757 ekeitaro D Oct. 31, 2017, 2:44 p.m. OK GNU C++14 TESTS 49 15 409600 2700
27210757 riteme D May 19, 2017, 8:39 a.m. OK GNU C++14 TESTS 49 15 819200 2700
26937730 Took D May 7, 2017, 5:27 p.m. OK GNU C++14 TESTS 49 15 1536000 2700
35615982 mr.omti D Feb. 24, 2018, 6:07 a.m. OK GNU C++14 TESTS 49 15 2355200 2700
35533388 timfame D Feb. 20, 2018, 9:06 p.m. OK GNU C++14 TESTS 49 15 2355200 2700
26458555 AnVaRsKI D April 17, 2017, 3:27 p.m. OK GNU C++14 TESTS 49 15 2355200 2700
25451713 shanin D March 13, 2017, 10:52 a.m. OK GNU C++14 TESTS 49 15 2355200 2700
25310719 TRCYX D March 7, 2017, 9:02 a.m. OK GNU C++14 TESTS 49 15 2355200 2700
25236597 mpsk7492 D March 5, 2017, 8:15 a.m. OK GNU C++14 TESTS 49 15 2355200 2700
25166691 Worg D March 3, 2017, 9:52 a.m. OK GNU C++14 TESTS 49 15 2355200 2700
66034100 GioChkhaidze D Nov. 30, 2019, 11:07 a.m. OK GNU C++17 TESTS 49 31 409600 2700
65954566 hjk1030 D Nov. 29, 2019, 12:16 p.m. OK GNU C++17 TESTS 49 31 409600 2700
54320357 errorgorn D May 17, 2019, 8:41 p.m. OK GNU C++17 TESTS 49 31 409600 2700
65267552 Hikori D Nov. 17, 2019, 5:53 p.m. OK GNU C++17 TESTS 49 31 512000 2700
54283462 oToToT D May 17, 2019, 2:38 p.m. OK GNU C++17 TESTS 49 31 614400 2700
64830367 user202729_ D Nov. 13, 2019, 3:48 p.m. OK GNU C++17 TESTS 49 31 716800 2700
56998223 Benq D July 14, 2019, 1:19 a.m. OK GNU C++17 TESTS 49 31 716800 2700
52021946 Shayan.P D March 30, 2019, 1:09 p.m. OK GNU C++17 TESTS 49 31 819200 2700
46568351 YenSean D Dec. 4, 2018, 2:59 a.m. OK GNU C++17 TESTS 49 31 819200 2700
66201948 achi_basadzishvili D Dec. 2, 2019, 9:53 p.m. OK GNU C++17 TESTS 49 31 1331200 2700
28283193 Megabyte D July 4, 2017, 2:44 p.m. OK Java 8 TESTS 49 109 20992000 2700
25792411 zefcod D March 25, 2017, 8:24 a.m. OK Java 8 TESTS 49 124 21196800 2700
27269268 RCG D May 21, 2017, 2:47 p.m. OK MS C++ TESTS 49 15 614400 2700
25046704 Yurik D Feb. 26, 2017, 9:47 a.m. OK MS C++ TESTS 49 62 2560000 2700

remove filters

Back to search problems