Educational Codeforces Round 52 (Rated for 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
1065 Educational Codeforces Round 52 (Rated for Div. 2) FINISHED False 7200 198169787 Oct. 11, 2018, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1330 ) D Three Pieces PROGRAMMING dfs and similar dp shortest paths 2200

B'You stumbled upon a new kind of chess puzzles. The chessboard you are given is not necesserily 8 x 8 , but it still is N x N . Each square has some number written on it, all the numbers are from 1 to N^2 and all the numbers are pairwise distinct. The j -th square in the i -th row has a number A_{ij} written on it. In your chess set you have only three pieces: a knight, a bishop and a rook. At first, you put one of them on the square with the number 1 (you can choose which one). Then you want to reach square 2 (possibly passing through some other squares in process), then square 3 and so on until you reach square N^2 . In one step you are allowed to either make a valid move with the current piece or replace it with some other piece. Each square can be visited arbitrary number of times. A knight can move to a square that is two squares away horizontally and one square vertically, or two squares vertically and one square horizontally. A bishop moves diagonally. A rook moves horizontally or vertically. The move should be performed to a different square from the one a piece is currently standing on. You want to minimize the number of steps of the whole traversal. Among all the paths to have the same number of steps you want to choose the one with the lowest number of piece replacements. What is the path you should take to satisfy all conditions? The first line contains a single integer N ( 3 <= N <= 10 ) -- the size of the chessboard. Each of the next N lines contains N integers A_{i1}, A_{i2}, ... , A_{iN} ( 1 <= A_{ij} <= N^2 ) -- the numbers written on the squares of the i -th row of the board. It is guaranteed that all A_{ij} are pairwise distinct. The only line should contain two integers -- the number of steps in the best answer and the number of replacement moves in it. Here are the steps for the first example (the starting piece is a'...

Tutorials

Educational Codeforces Round 52 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
49841182 rainboy D Feb. 12, 2019, 6:31 p.m. OK GNU C11 TESTS 98 31 0 2200
45071037 Ehsan22 D Oct. 29, 2018, 7:44 p.m. OK GNU C++11 TESTS 98 31 0 2200
44142026 sun_en_ze D Oct. 11, 2018, 4:01 p.m. OK GNU C++11 TESTS 98 31 0 2200
53038770 Scut82 D April 20, 2019, 8:43 a.m. OK GNU C++11 TESTS 98 31 0 2200
55391511 EndRay D June 10, 2019, 9:56 a.m. OK GNU C++11 TESTS 98 31 0 2200
46770278 wa007 D Dec. 8, 2018, 4:35 p.m. OK GNU C++11 TESTS 98 31 102400 2200
45271220 HidenoriS D Nov. 4, 2018, 8:36 a.m. OK GNU C++11 TESTS 98 31 102400 2200
44818550 arolakiv D Oct. 24, 2018, 11:34 p.m. OK GNU C++11 TESTS 98 31 102400 2200
44459736 Skr008 D Oct. 17, 2018, 7:46 p.m. OK GNU C++11 TESTS 98 31 102400 2200
44280816 Rockett D Oct. 14, 2018, 4:25 a.m. OK GNU C++11 TESTS 98 31 102400 2200
51659822 Zenkai D March 22, 2019, 1:40 a.m. OK GNU C++11 TESTS 98 31 102400 2200
44231139 ZieiN D Oct. 13, 2018, 12:15 a.m. OK GNU C++14 TESTS 98 30 204800 2200
44167596 huuduy16 D Oct. 12, 2018, 3:06 a.m. OK GNU C++14 TESTS 98 30 716800 2200
45346273 minson123 D Nov. 6, 2018, 3:26 a.m. OK GNU C++14 TESTS 98 31 0 2200
44242856 vladmart D Oct. 13, 2018, 7:36 a.m. OK GNU C++14 TESTS 98 31 0 2200
44211101 ooOAM D Oct. 12, 2018, 4:04 p.m. OK GNU C++14 TESTS 98 31 0 2200
44186762 GrainOfSand D Oct. 12, 2018, 1:26 p.m. OK GNU C++14 TESTS 98 31 0 2200
44171752 MeePwn D Oct. 12, 2018, 6:21 a.m. OK GNU C++14 TESTS 98 31 0 2200
44165712 upvoteme01 D Oct. 12, 2018, 1:13 a.m. OK GNU C++14 TESTS 98 31 0 2200
44153437 GrainOfSand D Oct. 11, 2018, 5:17 p.m. OK GNU C++14 TESTS 98 31 0 2200
45566646 imathi D Nov. 11, 2018, 2:57 p.m. OK GNU C++14 TESTS 98 31 0 2200
52140897 DANDROZAVR D April 1, 2019, 6:39 a.m. OK GNU C++17 TESTS 98 31 0 2200
44487287 Phortox D Oct. 18, 2018, 1:05 p.m. OK GNU C++17 TESTS 98 31 204800 2200
44934216 out111 D Oct. 27, 2018, 4:17 a.m. OK GNU C++17 TESTS 98 31 307200 2200
44345184 ForeverL0ve D Oct. 15, 2018, 6:48 a.m. OK GNU C++17 TESTS 98 31 307200 2200
44150726 dohyun0324 D Oct. 11, 2018, 4:46 p.m. OK GNU C++17 TESTS 98 31 307200 2200
44522266 Phortox D Oct. 18, 2018, 9:59 p.m. OK GNU C++17 TESTS 98 31 307200 2200
68086160 _Aaryan_ D Jan. 2, 2020, 4:19 p.m. OK GNU C++17 TESTS 98 31 307200 2200
45999639 kongroo D Nov. 20, 2018, 1:54 p.m. OK GNU C++17 TESTS 98 31 409600 2200
44220534 SolitaryWayfarer D Oct. 12, 2018, 5:08 p.m. OK GNU C++17 TESTS 98 31 409600 2200
44156339 tfg D Oct. 11, 2018, 6:31 p.m. OK GNU C++17 TESTS 98 31 409600 2200
44459505 wadissimo D Oct. 17, 2018, 7:39 p.m. OK Java 8 TESTS 98 124 0 2200
44218675 spar5h D Oct. 12, 2018, 4:42 p.m. OK Java 8 TESTS 98 124 0 2200
44779861 CrazyFlower D Oct. 24, 2018, 3:59 p.m. OK Java 8 TESTS 98 140 14950400 2200
44146997 Kharouba D Oct. 11, 2018, 4:26 p.m. OK Java 8 TESTS 98 155 0 2200
44237107 t.yoshihara.ae D Oct. 13, 2018, 5:20 a.m. OK Java 8 TESTS 98 186 0 2200
44153713 Shaykhutdinov-T-I D Oct. 11, 2018, 5:22 p.m. OK Java 8 TESTS 98 186 0 2200
44141842 lonelydreamer D Oct. 11, 2018, 4 p.m. OK Java 8 TESTS 98 187 0 2200
44146370 baobab D Oct. 11, 2018, 4:23 p.m. OK Java 8 TESTS 98 233 0 2200
44192198 vaibhavpulastya D Oct. 12, 2018, 2:47 p.m. OK Java 8 TESTS 98 342 0 2200
44401878 cyfun D Oct. 16, 2018, 1:10 p.m. OK Java 8 TESTS 98 343 0 2200
44159629 omikad D Oct. 11, 2018, 8:35 p.m. OK Mono C# TESTS 98 155 10240000 2200
44569832 jainchethan87 D Oct. 20, 2018, 4:13 a.m. OK Mono C# TESTS 98 389 4915200 2200
44616273 math957963 D Oct. 21, 2018, 1:57 a.m. OK MS C++ TESTS 98 46 0 2200
44720044 UminchuR D Oct. 23, 2018, 4:15 a.m. OK MS C++ TESTS 98 78 716800 2200
44269362 Kerpoo D Oct. 13, 2018, 6:13 p.m. OK MS C++ TESTS 98 93 50176000 2200
44269336 Kerpoo D Oct. 13, 2018, 6:12 p.m. OK MS C++ TESTS 98 93 50176000 2200
44269131 Kerpoo D Oct. 13, 2018, 6:06 p.m. OK MS C++ TESTS 98 93 50176000 2200
60695241 pajenegod D Sept. 16, 2019, 7:19 p.m. OK PyPy 2 TESTS 98 374 2457600 2200
44550612 test616.cpp D Oct. 19, 2018, 3:10 p.m. OK PyPy 2 TESTS 98 405 12288000 2200
44550599 test616.cpp D Oct. 19, 2018, 3:10 p.m. OK Python 2 TESTS 98 1746 8192000 2200
54814646 whatshisbucket D May 29, 2019, 7 p.m. OK Python 3 TESTS 98 1435 8192000 2200
67432644 r57shell D Dec. 22, 2019, 3:47 p.m. OK Python 3 TESTS 98 1809 2150400 2200
44141829 kobae964 D Oct. 11, 2018, 4 p.m. OK Rust TESTS 98 156 106393600 2200
44177298 yakamoto D Oct. 12, 2018, 9:29 a.m. OK Scala TESTS 98 732 0 2200

remove filters

Back to search problems