Codeforces Round 619 (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
1301 Codeforces Round 619 (Div. 2) FINISHED False 7200 150218699 Feb. 13, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1290 ) F Super Jaber PROGRAMMING dfs and similar graphs implementation shortest paths 2700

B'Jaber is a superhero in a large country that can be described as a grid with n rows and m columns, where every cell in that grid contains a different city. Jaber gave every city in that country a specific color between 1 and k . In one second he can go from the current city to any of the cities adjacent by the side or to any city with the same color as the current city color. Jaber has to do q missions. In every mission he will be in the city at row r_1 and column c_1 , and he should help someone in the city at row r_2 and column c_2 . Jaber wants your help to tell him the minimum possible time to go from the starting city to the finishing city for every mission. The first line contains three integers n , m and k ( 1 <= q n, m <= q 1000 , 1 <= q k <= q min(40 , n cdot m) ) -- the number of rows, columns and colors. Each of the next n lines contains m integers. In the i -th line, the j -th integer is a_{ij} ( 1 <= q a_{ij} <= q k ), which is the color assigned to the city in the i -th row and j -th column. The next line contains one integer q ( 1 <= q q <= q 10^{5} ) -- the number of missions. For the next q lines, every line contains four integers r_1 , c_1 , r_2 , c_2 ( 1 <= q r_1 , r_2 <= q n , 1 <= q c_1 , c_2 <= q m ) -- the coordinates of the starting and the finishing cities of the corresponding mission. It is guaranteed that for every color between 1 and k there is at least one city of that color. For every mission print the minimum possible time to reach city at the cell (r_2, c_2) starting from city at the cell (r_1, c_1) . In the first example: In the second example: '...

Tutorials

Codeforces Round #619 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
70984142 rainboy F Feb. 13, 2020, 3:23 p.m. OK GNU C11 TESTS 73 2152 168345600 2700
71070725 rainboy F Feb. 14, 2020, 3:49 p.m. OK GNU C11 TESTS 74 2667 176332800 2700
71052510 kkktl01 F Feb. 14, 2020, 10:29 a.m. OK GNU C++11 TESTS 74 748 186060800 2700
71091245 Frame233 F Feb. 15, 2020, 1:46 a.m. OK GNU C++11 TESTS 74 1247 208486400 2700
71028699 s_r_f F Feb. 14, 2020, 1:55 a.m. OK GNU C++11 TESTS 74 1263 195174400 2700
71063044 mmmod_lqs F Feb. 14, 2020, 1:52 p.m. OK GNU C++11 TESTS 74 1575 116326400 2700
71081230 Frozen_Guardian F Feb. 14, 2020, 7:08 p.m. OK GNU C++11 TESTS 74 1653 244531200 2700
71063071 StarrySky1024 F Feb. 14, 2020, 1:52 p.m. OK GNU C++11 TESTS 74 1716 238592000 2700
71030407 tiger0817 F Feb. 14, 2020, 2:53 a.m. OK GNU C++11 TESTS 74 1731 206540800 2700
71047485 Willem F Feb. 14, 2020, 8:53 a.m. OK GNU C++11 TESTS 74 1840 226713600 2700
71093271 OMG_wc F Feb. 15, 2020, 3:16 a.m. OK GNU C++11 TESTS 74 1902 194252800 2700
71030703 WZYYN F Feb. 14, 2020, 3:03 a.m. OK GNU C++11 TESTS 74 1964 211456000 2700
71000141 wucstdio F Feb. 13, 2020, 4:11 p.m. OK GNU C++14 TESTS 73 967 186163200 2700
70997400 Motarack F Feb. 13, 2020, 4:02 p.m. OK GNU C++14 TESTS 73 1153 164352000 2700
71085372 jonathanesmuyguapo F Feb. 14, 2020, 8:54 p.m. OK GNU C++14 TESTS 74 1232 96051200 2700
71047698 zzu20172430702 F Feb. 14, 2020, 8:57 a.m. OK GNU C++14 TESTS 74 1544 207667200 2700
71057605 A_Little_Yellow F Feb. 14, 2020, 12:32 p.m. OK GNU C++14 TESTS 74 1699 207667200 2700
71051647 Mbfibat F Feb. 14, 2020, 10:11 a.m. OK GNU C++14 TESTS 74 1715 190156800 2700
71022203 rainboy F Feb. 13, 2020, 8:56 p.m. OK GNU C++14 TESTS 73 1824 168345600 2700
71002995 dlalswp25 F Feb. 13, 2020, 4:20 p.m. OK GNU C++14 TESTS 73 1871 229785600 2700
71026745 shadesOfRed F Feb. 14, 2020, 12:27 a.m. OK GNU C++14 TESTS 74 1918 237056000 2700
71092038 SuperJ6 F Feb. 15, 2020, 2:26 a.m. OK GNU C++14 TESTS 74 1964 167526400 2700
71005028 74TrAkToR F Feb. 13, 2020, 4:27 p.m. OK GNU C++17 TESTS 73 842 174080000 2700
71011717 teapotd F Feb. 13, 2020, 5:43 p.m. OK GNU C++17 TESTS 73 904 164454400 2700
71017875 neal F Feb. 13, 2020, 7:12 p.m. OK GNU C++17 TESTS 73 982 61952000 2700
71017901 neal F Feb. 13, 2020, 7:13 p.m. OK GNU C++17 TESTS 73 1013 56832000 2700
71017818 neal F Feb. 13, 2020, 7:11 p.m. OK GNU C++17 TESTS 73 1029 61952000 2700
70988636 dreamoon_love_AA F Feb. 13, 2020, 3:36 p.m. OK GNU C++17 TESTS 73 1325 194048000 2700
71000364 DP_l_J_K_L_M_N_O_P F Feb. 13, 2020, 4:12 p.m. OK GNU C++17 TESTS 73 1357 208486400 2700
71013186 BrunoTissei F Feb. 13, 2020, 5:58 p.m. OK GNU C++17 TESTS 73 1372 189030400 2700
71001112 neal F Feb. 13, 2020, 4:14 p.m. OK GNU C++17 TESTS 73 1621 66048000 2700
71000973 COVID-19 F Feb. 13, 2020, 4:14 p.m. OK GNU C++17 TESTS 73 1622 91136000 2700
71031392 uwi F Feb. 14, 2020, 3:26 a.m. OK Java 11 TESTS 74 3042 260096000 2700
71005057 Harpae F Feb. 13, 2020, 4:27 p.m. OK Java 8 TESTS 73 3697 249241600 2700
71010835 pichulia F Feb. 13, 2020, 5:35 p.m. OK MS C++ 2017 TESTS 73 1809 186265600 2700
71033841 sansen F Feb. 14, 2020, 4:35 a.m. OK Rust TESTS 74 2074 81100800 2700
71033757 sansen F Feb. 14, 2020, 4:32 a.m. OK Rust TESTS 74 3400 207769600 2700

remove filters

Back to search problems