Codeforces Round 505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)

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
1025 Codeforces Round 505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) FINISHED False 8100 202839924 Aug. 19, 2018, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 576 ) E Colored Cubes PROGRAMMING constructive algorithms implementation matrices 2600

B"Vasya passes all exams! Despite expectations, Vasya is not tired, moreover, he is ready for new challenges. However, he does not want to work too hard on difficult problems. Vasya remembered that he has a not-so-hard puzzle: m colored cubes are placed on a chessboard of size n x n . The fact is that m <= q n and all cubes have distinct colors. Each cube occupies exactly one cell. Also, there is a designated cell for each cube on the board, the puzzle is to place each cube on its place. The cubes are fragile, so in one operation you only can move one cube onto one of four neighboring by side cells, if only it is empty. Vasya wants to be careful, so each operation takes exactly one second. Vasya used to train hard for VK Cup Final, so he can focus his attention on the puzzle for at most 3 hours, that is 10800 seconds. Help Vasya find such a sequence of operations that all cubes will be moved onto their designated places, and Vasya won't lose his attention. The first line contains two integers n and m ( 1 <= q m <= q n <= q 50 ). Each of the next m lines contains two integers x_i , y_i ( 1 <= q x_i, y_i <= q n ), the initial positions of the cubes. The next m lines describe the designated places for the cubes in the same format and order. It is guaranteed that all initial positions are distinct and all designated places are distinct, however, it is possible that some initial positions coincide with some final positions. In the first line print a single integer k ( 0 <= k <= q 10800 ) -- the number of operations Vasya should make. In each of the next k lines you should describe one operation: print four integers x_1 , y_1 , x_2 , y_2 , where x_1, y_1 is the position of the cube Vasya should move, and x_2, y_2 is the new position of the cube. The cells x_1, y_1 and x_2, y_2 should have a common side, the cell x_2, y_2$$"...

Tutorials

Codeforces Round #505 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41884277 Lixiang666 E Aug. 20, 2018, 2:40 a.m. OK GNU C++ TESTS 68 31 0 2600
41919197 616156 E Aug. 21, 2018, 2:17 a.m. OK GNU C++ TESTS 68 31 102400 2600
42306846 shuai_hui E Aug. 31, 2018, 11:52 a.m. OK GNU C++ TESTS 68 31 307200 2600
41999853 170104100115 E Aug. 23, 2018, 2:24 p.m. OK GNU C++ TESTS 68 31 307200 2600
42072459 SylvanasS E Aug. 25, 2018, 2:02 a.m. OK GNU C++ TESTS 68 31 409600 2600
41899956 FSC E Aug. 20, 2018, 11:40 a.m. OK GNU C++ TESTS 68 31 409600 2600
41885482 lastans E Aug. 20, 2018, 3:23 a.m. OK GNU C++ TESTS 68 31 409600 2600
41920695 samjia2000 E Aug. 21, 2018, 3:50 a.m. OK GNU C++ TESTS 68 31 409600 2600
42282066 nh_dantz E Aug. 30, 2018, 2:47 p.m. OK GNU C++ TESTS 68 31 409600 2600
41988327 rainy_season E Aug. 23, 2018, 7:22 a.m. OK GNU C++ TESTS 68 31 716800 2600
41920207 251 E Aug. 21, 2018, 3:18 a.m. OK GNU C++11 TESTS 68 31 0 2600
42116672 HEXU234 E Aug. 26, 2018, 10:09 a.m. OK GNU C++11 TESTS 68 31 102400 2600
42015195 themaxmaxmax E Aug. 24, 2018, 5:51 a.m. OK GNU C++11 TESTS 68 31 102400 2600
69606179 KyuushuKyuuhai E Jan. 27, 2020, 9:49 a.m. OK GNU C++11 TESTS 68 31 204800 2600
69595257 KyuushuKyuuhai E Jan. 27, 2020, 4:10 a.m. OK GNU C++11 TESTS 68 31 204800 2600
59119939 CQUzbx E Aug. 20, 2019, 4:28 a.m. OK GNU C++11 TESTS 68 31 204800 2600
51201411 cly_none E March 11, 2019, 11:54 p.m. OK GNU C++11 TESTS 68 31 204800 2600
46840328 fwat E Dec. 10, 2018, 7:04 a.m. OK GNU C++11 TESTS 68 31 204800 2600
44096743 Pickupwin E Oct. 11, 2018, 1:35 a.m. OK GNU C++11 TESTS 68 31 204800 2600
44096734 Pickupwin E Oct. 11, 2018, 1:34 a.m. OK GNU C++11 TESTS 68 31 204800 2600
52602713 LODB---D E April 11, 2019, 12:38 p.m. OK GNU C++14 TESTS 68 30 307200 2600
41902335 apiadu E Aug. 20, 2018, 12:50 p.m. OK GNU C++14 TESTS 68 30 409600 2600
41877170 karasek E Aug. 19, 2018, 9:39 p.m. OK GNU C++14 TESTS 68 31 204800 2600
48662171 RobeZH E Jan. 21, 2019, 6:28 a.m. OK GNU C++14 TESTS 68 31 204800 2600
42746214 misztsu E Sept. 10, 2018, 7:27 p.m. OK GNU C++14 TESTS 68 31 204800 2600
42107234 ShakuganSky E Aug. 26, 2018, 2:17 a.m. OK GNU C++14 TESTS 68 31 204800 2600
41900258 LucaSeri E Aug. 20, 2018, 11:49 a.m. OK GNU C++14 TESTS 68 31 204800 2600
41891056 cephian E Aug. 20, 2018, 7:09 a.m. OK GNU C++14 TESTS 68 31 204800 2600
51401037 Heart_Blue E March 17, 2019, 7:21 a.m. OK GNU C++14 TESTS 68 31 307200 2600
42905772 wilson.ho E Sept. 16, 2018, 1:11 a.m. OK GNU C++14 TESTS 68 31 307200 2600
41892309 lintoto E Aug. 20, 2018, 7:45 a.m. OK GNU C++17 TESTS 68 30 204800 2600
62048102 hjk1030 E Oct. 7, 2019, 8:35 a.m. OK GNU C++17 TESTS 68 31 307200 2600
51938879 BinaryBoy E March 28, 2019, 1:39 p.m. OK GNU C++17 TESTS 68 31 307200 2600
44095783 endereye E Oct. 11, 2018, 12:02 a.m. OK GNU C++17 TESTS 68 31 307200 2600
42018937 petko1998 E Aug. 24, 2018, 8 a.m. OK GNU C++17 TESTS 68 31 307200 2600
41974600 Juve45 E Aug. 22, 2018, 5:39 p.m. OK GNU C++17 TESTS 68 31 307200 2600
41967698 Gmacem E Aug. 22, 2018, 1:15 p.m. OK GNU C++17 TESTS 68 31 307200 2600
41947291 staffik E Aug. 21, 2018, 7:50 p.m. OK GNU C++17 TESTS 68 31 307200 2600
41936288 Supermagzzz E Aug. 21, 2018, 1:09 p.m. OK GNU C++17 TESTS 68 31 307200 2600
41911878 NoDesire E Aug. 20, 2018, 6:26 p.m. OK GNU C++17 TESTS 68 31 307200 2600
42023488 vjudge2 E Aug. 24, 2018, 10:50 a.m. OK GNU C++17 Diagnostics TESTS 68 982 2560000 2600
41867845 Harpae E Aug. 19, 2018, 5:32 p.m. OK Java 8 TESTS 68 140 0 2600
42143748 bsrkaditya E Aug. 27, 2018, 7:32 a.m. OK Java 8 TESTS 68 155 0 2600
41970485 sarthakmanna E Aug. 22, 2018, 2:47 p.m. OK Java 8 TESTS 68 155 0 2600
41970194 sarthakmanna E Aug. 22, 2018, 2:37 p.m. OK Java 8 TESTS 68 155 0 2600
41911960 profi E Aug. 20, 2018, 6:29 p.m. OK Java 8 TESTS 68 217 0 2600
42140321 AbdelRahmanEmara E Aug. 27, 2018, 4:49 a.m. OK Java 8 TESTS 68 249 1740800 2600
49809573 Shaykhutdinov-T-I E Feb. 11, 2019, 10:44 p.m. OK Java 8 TESTS 68 326 0 2600
41888412 uwi E Aug. 20, 2018, 5:38 a.m. OK Java 8 TESTS 68 390 0 2600
41896149 GustavK E Aug. 20, 2018, 9:34 a.m. OK Mono C# TESTS 68 78 3891200 2600
41862839 chokudai E Aug. 19, 2018, 3:39 p.m. OK Mono C# TESTS 68 78 4710400 2600
41861619 lucyanna2018 E Aug. 19, 2018, 3:32 p.m. OK MS C++ TESTS 68 31 307200 2600
42442860 _mactep E Sept. 3, 2018, 10:54 p.m. OK MS C++ TESTS 68 62 512000 2600
42073414 Butane E Aug. 25, 2018, 2:48 a.m. OK Python 2 TESTS 68 186 512000 2600

remove filters

Back to search problems