Codeforces Round 531 (Div. 3)

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
1102 Codeforces Round 531 (Div. 3) FINISHED False 7200 184778699 Jan. 9, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2025 ) F Elongated Matrix PROGRAMMING binary search bitmasks brute force dp graphs 2400

B"You are given a matrix a , consisting of n rows and m columns. Each cell contains an integer in it. You can change the order of rows arbitrarily (including leaving the initial order), but you can't change the order of cells in a row. After you pick some order of rows, you traverse the whole matrix the following way: firstly visit all cells of the first column from the top row to the bottom one, then the same for the second column and so on. During the traversal you write down the sequence of the numbers on the cells in the same order you visited them. Let that sequence be s_1, s_2, ... , s_{nm} . The traversal is k -acceptable if for all i ( 1 <= i <= nm - 1 ) |s_i - s_{i + 1}| ge k . Find the maximum integer k such that there exists some order of rows of matrix a that it produces a k -acceptable traversal. The first line contains two integers n and m ( 1 <= n <= 16 , 1 <= m <= 10^4 , 2 <= nm ) -- the number of rows and the number of columns, respectively. Each of the next n lines contains m integers ( 1 <= a_{i, j} <= 10^9 ) -- the description of the matrix. Print a single integer k -- the maximum number such that there exists some order of rows of matrix a that it produces an k -acceptable traversal. In the first example you can rearrange rows as following to get the 5 -acceptable traversal: Then the sequence s will be [5, 10, 4, 9, 3, 8, 3, 9] . Each pair of neighbouring elements have at least k = 5 difference between them. In the second example the maximum k = 0 , any order is 0 -acceptable. In the third example the given order is already 3 -acceptable, you can leave it as it is. "...

Tutorials

64439

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
51854490 chaorenhaha F March 26, 2019, 9:52 a.m. OK FPC TESTS 47 639 29491200 2400
48631687 namratha_253 F Jan. 20, 2019, 1:31 p.m. OK GNU C11 TESTS 47 249 4812800 2400
48580086 s0199988819 F Jan. 19, 2019, 4:10 p.m. OK GNU C11 TESTS 47 249 4812800 2400
53795549 Rockett F May 5, 2019, 3:07 p.m. OK GNU C++11 TESTS 47 171 85196800 2400
48906150 codename27 F Jan. 24, 2019, 8:34 p.m. OK GNU C++11 TESTS 47 186 8908800 2400
49774878 Photinia.S F Feb. 11, 2019, 3:02 p.m. OK GNU C++11 TESTS 47 202 9011200 2400
48382847 Wechselhau F Jan. 14, 2019, 11:23 a.m. OK GNU C++11 TESTS 47 202 67993600 2400
48180021 Chenqiqian F Jan. 10, 2019, 11:58 a.m. OK GNU C++11 TESTS 47 217 5120000 2400
49654361 keke_haha F Feb. 9, 2019, 9:09 a.m. OK GNU C++11 TESTS 47 233 76595200 2400
51601562 Zenkai F March 21, 2019, 4:19 a.m. OK GNU C++11 TESTS 47 233 78643200 2400
48179178 cqqqqwq F Jan. 10, 2019, 11:32 a.m. OK GNU C++11 TESTS 47 234 5120000 2400
49074854 xiemiao F Jan. 28, 2019, 1:46 a.m. OK GNU C++11 TESTS 47 249 77209600 2400
49280436 haozongyin F Jan. 31, 2019, 3:23 p.m. OK GNU C++11 TESTS 47 265 71475200 2400
48172982 gyz_gyz F Jan. 10, 2019, 7:54 a.m. OK GNU C++14 TESTS 47 155 67891200 2400
48164012 Rafaelcs F Jan. 9, 2019, 9:53 p.m. OK GNU C++14 TESTS 47 186 5939200 2400
49170708 schtomi97 F Jan. 29, 2019, 6:05 p.m. OK GNU C++14 TESTS 47 186 6041600 2400
48190573 Corvus F Jan. 10, 2019, 5:38 p.m. OK GNU C++14 TESTS 47 249 5017600 2400
48160848 icecuber F Jan. 9, 2019, 7:29 p.m. OK GNU C++14 TESTS 47 249 67891200 2400
64058233 cimh F Nov. 2, 2019, 2:32 a.m. OK GNU C++14 TESTS 47 264 5427200 2400
48556232 dai F Jan. 19, 2019, 5:31 a.m. OK GNU C++14 TESTS 47 264 67891200 2400
48198750 vjudge5 F Jan. 11, 2019, 2:59 a.m. OK GNU C++14 TESTS 47 265 9625600 2400
48198768 PengsenMao F Jan. 11, 2019, 3:01 a.m. OK GNU C++14 TESTS 47 265 9625600 2400
49832236 lanpang F Feb. 12, 2019, 2:26 p.m. OK GNU C++14 TESTS 47 280 5529600 2400
56269304 Felerius F June 29, 2019, 11:26 a.m. OK GNU C++17 TESTS 47 124 23654400 2400
56272105 Felerius F June 29, 2019, 12:32 p.m. OK GNU C++17 TESTS 47 140 2662400 2400
56268144 Felerius F June 29, 2019, 10:47 a.m. OK GNU C++17 TESTS 47 155 2662400 2400
48464096 Felerius F Jan. 16, 2019, 4:18 p.m. OK GNU C++17 TESTS 47 171 2867200 2400
48463358 Felerius F Jan. 16, 2019, 3:54 p.m. OK GNU C++17 TESTS 47 171 2867200 2400
48654257 ReaLNero1 F Jan. 21, 2019, 1:25 a.m. OK GNU C++17 TESTS 47 171 2867200 2400
48463864 Felerius F Jan. 16, 2019, 4:10 p.m. OK GNU C++17 TESTS 47 186 4812800 2400
48463175 Felerius F Jan. 16, 2019, 3:48 p.m. OK GNU C++17 TESTS 47 187 2867200 2400
49100145 sarwarkhan F Jan. 28, 2019, 11:03 a.m. OK GNU C++17 TESTS 47 187 12083200 2400
48463691 Felerius F Jan. 16, 2019, 4:04 p.m. OK GNU C++17 TESTS 47 202 4812800 2400
48161546 wadissimo F Jan. 9, 2019, 7:54 p.m. OK Java 8 TESTS 47 608 3072000 2400
48164452 yousef0 F Jan. 9, 2019, 10:31 p.m. OK Java 8 TESTS 47 623 3174400 2400
48168309 SpargelTarzan F Jan. 10, 2019, 4:09 a.m. OK Java 8 TESTS 47 624 157081600 2400
61036017 beginner1010 F Sept. 21, 2019, 7:54 p.m. OK Java 8 TESTS 47 748 71270400 2400
69210786 Menna_ibrahim F Jan. 20, 2020, 7:56 p.m. OK Java 8 TESTS 47 748 126668800 2400
48987497 YahiaBadr F Jan. 26, 2019, 12:58 p.m. OK Java 8 TESTS 47 748 129740800 2400
48557516 vjudge2 F Jan. 19, 2019, 6 a.m. OK Java 8 TESTS 47 764 127283200 2400
48465614 jayliner66 F Jan. 16, 2019, 5:05 p.m. OK Java 8 TESTS 47 779 157184000 2400
48189220 SpargelTarzan F Jan. 10, 2019, 4:52 p.m. OK Java 8 TESTS 47 795 157081600 2400
48200251 StayAwayFromBitches F Jan. 11, 2019, 4:55 a.m. OK Java 8 TESTS 47 811 0 2400
51653109 Mosyagin F March 21, 2019, 7:48 p.m. OK Mono C# TESTS 47 1044 24166400 2400
48661506 vjudge1 F Jan. 21, 2019, 6:13 a.m. OK MS C++ TESTS 47 405 212172800 2400
48495624 bilguunt F Jan. 17, 2019, 12:50 p.m. OK MS C++ TESTS 47 467 39321600 2400
48210686 horchanirim F Jan. 11, 2019, 11:49 a.m. OK MS C++ TESTS 47 467 39321600 2400
59925167 vjudge2 F Sept. 3, 2019, 3:20 a.m. OK MS C++ 2017 TESTS 47 436 76595200 2400
48944594 titia F Jan. 25, 2019, 6:24 p.m. OK PyPy 3 TESTS 47 2339 32358400 2400
48214000 okumura F Jan. 11, 2019, 1:38 p.m. OK PyPy 3 TESTS 47 3961 37376000 2400
50655952 gatsko F March 1, 2019, 7:34 p.m. OK PyPy 3 TESTS 47 3993 37683200 2400

remove filters

Back to search problems