Codeforces Round 555 (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
1157 Codeforces Round 555 (Div. 3) FINISHED False 7200 180890663 April 26, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 938 ) G Inverse of Rows and Columns PROGRAMMING brute force constructive algorithms 2800

B'You are given a binary matrix a of size n x m . A binary matrix is a matrix where each element is either 0 or 1 . You may perform some (possibly zero) operations with this matrix. During each operation you can inverse the row of this matrix or a column of this matrix. Formally, inverting a row is changing all values in this row to the opposite ( 0 to 1 , 1 to 0 ). Inverting a column is changing all values in this column to the opposite. Your task is to sort the initial matrix by some sequence of such operations. The matrix is considered sorted if the array [a_{1, 1}, a_{1, 2}, ... , a_{1, m}, a_{2, 1}, a_{2, 2}, ... , a_{2, m}, ... , a_{n, m - 1}, a_{n, m}] is sorted in non-descending order. The first line of the input contains two integers n and m ( 1 <= n, m <= 200 ) -- the number of rows and the number of columns in the matrix. The next n lines contain m integers each. The j -th element in the i -th line is a_{i, j} ( 0 <= a_{i, j} <= 1 ) -- the element of a at position (i, j) . If it is impossible to obtain a sorted matrix, print "NO" in the first line. Otherwise print "YES" in the first line. In the second line print a string r of length n . The i -th character r_i of this string should be '1 ' if the i -th row of the matrix is inverted and '0 ' otherwise. In the third line print a string c of length m . The j -th character c_j of this string should be '1 ' if the j -th column of the matrix is inverted and '0 ' otherwise. If there are multiple answers, you can print any. '...

Tutorials

66737

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53970012 about G May 10, 2019, 8:15 p.m. OK GNU C11 TESTS 68 31 204800 2800
53843408 rivercraft G May 7, 2019, 9:05 a.m. OK GNU C++11 TESTS 68 31 0 2800
53736968 jinsedepi G May 4, 2019, 11:25 a.m. OK GNU C++11 TESTS 68 31 0 2800
59559528 chenyewei_1234 G Aug. 27, 2019, 7:50 a.m. OK GNU C++11 TESTS 68 31 102400 2800
55829023 luogu_bot4 G June 20, 2019, 12:16 p.m. OK GNU C++11 TESTS 68 31 204800 2800
55828599 wucstdio G June 20, 2019, 12:04 p.m. OK GNU C++11 TESTS 68 31 204800 2800
54327989 vjudge4 G May 18, 2019, 4:05 a.m. OK GNU C++11 TESTS 68 31 204800 2800
54327923 AC_MATION G May 18, 2019, 4:03 a.m. OK GNU C++11 TESTS 68 31 204800 2800
54177570 vjudge1 G May 15, 2019, 2:29 p.m. OK GNU C++11 TESTS 68 31 204800 2800
53489628 TTTT0720 G April 29, 2019, 7:31 a.m. OK GNU C++11 TESTS 68 31 204800 2800
55829049 luogu_bot3 G June 20, 2019, 12:17 p.m. OK GNU C++11 TESTS 68 31 204800 2800
53595814 tjd229 G May 1, 2019, 4:18 a.m. OK GNU C++14 TESTS 68 31 102400 2800
53489492 tianyun G April 29, 2019, 7:24 a.m. OK GNU C++14 TESTS 68 31 102400 2800
53659459 LODB---D G May 2, 2019, 6:53 a.m. OK GNU C++14 TESTS 68 31 102400 2800
58877310 hiep622032001 G Aug. 15, 2019, 6:36 p.m. OK GNU C++14 TESTS 68 31 204800 2800
54067332 Fancy_Gemini G May 13, 2019, 2:09 p.m. OK GNU C++14 TESTS 68 31 204800 2800
53714203 m4h G May 3, 2019, 5:51 p.m. OK GNU C++14 TESTS 68 31 204800 2800
53498725 henu_16l_lxl G April 29, 2019, 1:11 p.m. OK GNU C++14 TESTS 68 31 204800 2800
64346654 taozi12138 G Nov. 6, 2019, 6:38 a.m. OK GNU C++14 TESTS 68 31 204800 2800
59259247 cheissmart G Aug. 22, 2019, 7:54 a.m. OK GNU C++14 TESTS 68 31 307200 2800
54526846 lungualex00 G May 23, 2019, 2:55 p.m. OK GNU C++14 TESTS 68 31 307200 2800
53485858 nickluo G April 29, 2019, 3:26 a.m. OK GNU C++17 TESTS 68 30 921600 2800
54026690 Shayan.P G May 12, 2019, 1:03 p.m. OK GNU C++17 TESTS 68 31 0 2800
55492401 antony191 G June 12, 2019, 10:45 a.m. OK GNU C++17 TESTS 68 31 102400 2800
54976133 ArshiaDadras G June 2, 2019, 10:54 a.m. OK GNU C++17 TESTS 68 31 102400 2800
53870412 201732110113 G May 8, 2019, 8:31 a.m. OK GNU C++17 TESTS 68 31 102400 2800
53789156 njtech1401170211 G May 5, 2019, 11:52 a.m. OK GNU C++17 TESTS 68 31 204800 2800
67134894 lrvideckis G Dec. 18, 2019, 3:27 a.m. OK GNU C++17 TESTS 68 31 204800 2800
54552726 old_new_phoenix G May 24, 2019, 10:02 a.m. OK GNU C++17 TESTS 68 31 204800 2800
53645695 Imenkey G May 1, 2019, 6:51 p.m. OK GNU C++17 TESTS 68 31 204800 2800
53486015 njtech1401170211 G April 29, 2019, 3:40 a.m. OK GNU C++17 TESTS 68 31 204800 2800
58144505 Darth_Jar_Jar_Binks G Aug. 1, 2019, 8:03 p.m. OK Java 8 TESTS 68 124 0 2800
53908537 karamkontar G May 9, 2019, 2:10 p.m. OK Java 8 TESTS 68 124 0 2800
53481583 cplayer G April 28, 2019, 8:35 p.m. OK Java 8 TESTS 68 124 0 2800
53478932 mvv056 G April 28, 2019, 5:52 p.m. OK Java 8 TESTS 68 139 0 2800
67263247 dalt G Dec. 20, 2019, 4:46 a.m. OK Java 8 TESTS 68 139 19148800 2800
57918330 dyhu083 G July 29, 2019, 2:58 a.m. OK Java 8 TESTS 68 140 0 2800
55111489 aznswimmerboi G June 5, 2019, 6:30 a.m. OK Java 8 TESTS 68 186 0 2800
55111008 aznswimmerboi G June 5, 2019, 6:15 a.m. OK Java 8 TESTS 68 187 0 2800
53529139 boltUsain G April 29, 2019, 6:23 p.m. OK Java 8 TESTS 68 218 0 2800
53708102 catforce G May 3, 2019, 2:13 p.m. OK Java 8 TESTS 68 234 0 2800
59707865 MathAlex G Aug. 30, 2019, 1:26 p.m. OK Kotlin TESTS 68 156 204800 2800
56855327 sekti G July 11, 2019, 6:02 p.m. OK Kotlin TESTS 68 187 1331200 2800
54171988 vjudge2 G May 15, 2019, 11:40 a.m. OK MS C++ TESTS 68 202 409600 2800
53974463 2017111799yjl G May 11, 2019, 2:38 a.m. OK MS C++ 2017 TESTS 68 46 204800 2800
53676927 petko_mitkov G May 2, 2019, 4:28 p.m. OK MS C++ 2017 TESTS 68 46 409600 2800
53488444 zzq233 G April 29, 2019, 6:35 a.m. OK MS C++ 2017 TESTS 68 46 409600 2800
56284738 xsc G June 29, 2019, 6:53 p.m. OK MS C++ 2017 TESTS 68 62 204800 2800
53879037 gatsko G May 8, 2019, 1:37 p.m. OK PyPy 2 TESTS 68 249 10035200 2800
53676859 titia G May 2, 2019, 4:25 p.m. OK PyPy 3 TESTS 68 171 1843200 2800
53800129 yfo G May 5, 2019, 6:01 p.m. OK PyPy 3 TESTS 68 202 1638400 2800
53711587 Wizmann G May 3, 2019, 3:56 p.m. OK Python 2 TESTS 68 202 307200 2800
53677236 Helli.code G May 2, 2019, 4:40 p.m. OK Python 2 TESTS 68 233 1126400 2800
53692437 gion.li G May 3, 2019, 5:48 a.m. OK Python 3 TESTS 68 155 512000 2800
53681243 pafos G May 2, 2019, 7:24 p.m. OK Scala TESTS 68 514 0 2800

remove filters

Back to search problems