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.
Problems
B"You are given a table consisting of n rows and m columns. Each cell of the table contains either 0 or 1. In one move, you are allowed to pick any row or any column and invert all values, that is, replace 0 by 1 and vice versa. What is the minimum number of cells with value 1 you can get after applying some number of operations? The first line of the input contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8920, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of rows and the number of columns, respectively. Then n lines follows with the descriptions of the rows. Each line has length m and contains only digits '0' and '1'. Output a single integer -- the minimum possible number of ones you can get after applying some sequence of operations. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
57192734 |
vjudge4 |
C |
July 17, 2019, 11:12 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
37 |
2074 |
29286400 |
|
2800 |
21561741 |
sgtlaugh |
C |
Oct. 18, 2016, 9:01 a.m. |
OK |
GNU C |
TESTS |
37 |
171 |
28160000 |
|
2800 |
29594097 |
wmd |
C |
Aug. 19, 2017, 9:17 a.m. |
OK |
GNU C++ |
TESTS |
37 |
109 |
16998400 |
|
2800 |
34336941 |
Hineven |
C |
Jan. 20, 2018, 3:31 a.m. |
OK |
GNU C++ |
TESTS |
37 |
109 |
21094400 |
|
2800 |
30609605 |
yhy |
C |
Sept. 22, 2017, 8:44 a.m. |
OK |
GNU C++ |
TESTS |
37 |
124 |
25395200 |
|
2800 |
33254000 |
wanglichao1121 |
C |
Dec. 15, 2017, 3:47 a.m. |
OK |
GNU C++ |
TESTS |
37 |
124 |
50176000 |
|
2800 |
33241170 |
Thefinal |
C |
Dec. 14, 2017, 1:39 p.m. |
OK |
GNU C++ |
TESTS |
37 |
139 |
86220800 |
|
2800 |
32783475 |
xianhaoming |
C |
Nov. 29, 2017, 2:38 p.m. |
OK |
GNU C++ |
TESTS |
37 |
139 |
114278400 |
|
2800 |
38485848 |
newbiegcz |
C |
May 21, 2018, 2:24 p.m. |
OK |
GNU C++ |
TESTS |
37 |
139 |
125235200 |
|
2800 |
21013251 |
skywalkert |
C |
Sept. 30, 2016, 11:27 a.m. |
OK |
GNU C++ |
TESTS |
37 |
140 |
8704000 |
|
2800 |
41578815 |
vjudge4 |
C |
Aug. 14, 2018, 6:55 a.m. |
OK |
GNU C++ |
TESTS |
37 |
140 |
17715200 |
|
2800 |
34627741 |
vjudge5 |
C |
Jan. 28, 2018, 8:35 a.m. |
OK |
GNU C++ |
TESTS |
37 |
140 |
19558400 |
|
2800 |
61295709 |
luogu_bot3 |
C |
Sept. 26, 2019, 12:50 a.m. |
OK |
GNU C++11 |
TESTS |
37 |
78 |
19353600 |
|
2800 |
48452251 |
LJC00118 |
C |
Jan. 16, 2019, 11:08 a.m. |
OK |
GNU C++11 |
TESTS |
37 |
93 |
10956800 |
|
2800 |
52135438 |
vjudge1 |
C |
April 1, 2019, 2:02 a.m. |
OK |
GNU C++11 |
TESTS |
37 |
93 |
19763200 |
|
2800 |
58832928 |
ntu_vjudge_2 |
C |
Aug. 14, 2019, 6:53 p.m. |
OK |
GNU C++11 |
TESTS |
37 |
108 |
20070400 |
|
2800 |
47899629 |
_CZH |
C |
Jan. 4, 2019, 1:15 p.m. |
OK |
GNU C++11 |
TESTS |
37 |
108 |
21913600 |
|
2800 |
51025174 |
vjudge1 |
C |
March 8, 2019, 11:28 a.m. |
OK |
GNU C++11 |
TESTS |
37 |
108 |
25702400 |
|
2800 |
68864589 |
Jackpei |
C |
Jan. 15, 2020, 1:10 p.m. |
OK |
GNU C++11 |
TESTS |
37 |
108 |
27340800 |
|
2800 |
67850590 |
xzsawq |
C |
Dec. 29, 2019, 2:36 a.m. |
OK |
GNU C++11 |
TESTS |
37 |
108 |
42086400 |
|
2800 |
59206356 |
forever_dreams |
C |
Aug. 21, 2019, 7:03 a.m. |
OK |
GNU C++11 |
TESTS |
37 |
109 |
17100800 |
|
2800 |
27705218 |
blutrex |
C |
June 10, 2017, 11:31 a.m. |
OK |
GNU C++11 |
TESTS |
37 |
109 |
17100800 |
|
2800 |
54654361 |
vjudge3 |
C |
May 26, 2019, 7:25 a.m. |
OK |
GNU C++14 |
TESTS |
37 |
93 |
11468800 |
|
2800 |
32795303 |
NiroBC |
C |
Nov. 30, 2017, 4:46 a.m. |
OK |
GNU C++14 |
TESTS |
37 |
124 |
20684800 |
|
2800 |
33380826 |
VastoLorde95 |
C |
Dec. 18, 2017, 1:28 p.m. |
OK |
GNU C++14 |
TESTS |
37 |
124 |
22118400 |
|
2800 |
54823757 |
vjudge1 |
C |
May 30, 2019, 5:09 a.m. |
OK |
GNU C++14 |
TESTS |
37 |
124 |
66150400 |
|
2800 |
56634535 |
icecuber |
C |
July 6, 2019, 6:32 p.m. |
OK |
GNU C++14 |
TESTS |
37 |
124 |
95744000 |
|
2800 |
59101180 |
Giver |
C |
Aug. 19, 2019, 4:08 p.m. |
OK |
GNU C++14 |
TESTS |
37 |
139 |
20172800 |
|
2800 |
25024320 |
MikeZ |
C |
Feb. 25, 2017, 9:46 p.m. |
OK |
GNU C++14 |
TESTS |
37 |
139 |
20787200 |
|
2800 |
34485981 |
bibibibi |
C |
Jan. 23, 2018, 2:51 p.m. |
OK |
GNU C++14 |
TESTS |
37 |
139 |
27238400 |
|
2800 |
68973866 |
vjudge3 |
C |
Jan. 17, 2020, 8:04 a.m. |
OK |
GNU C++14 |
TESTS |
37 |
140 |
27648000 |
|
2800 |
40393153 |
mmkh |
C |
July 16, 2018, 2:44 a.m. |
OK |
GNU C++14 |
TESTS |
37 |
140 |
34201600 |
|
2800 |
48104843 |
perilla_bot |
C |
Jan. 9, 2019, 3:28 a.m. |
OK |
GNU C++17 |
TESTS |
37 |
93 |
15667200 |
|
2800 |
66638991 |
Louhc |
C |
Dec. 11, 2019, 2:01 p.m. |
OK |
GNU C++17 |
TESTS |
37 |
124 |
23142400 |
|
2800 |
50603714 |
fcwww |
C |
Feb. 28, 2019, 1:43 p.m. |
OK |
GNU C++17 |
TESTS |
37 |
139 |
19046400 |
|
2800 |
66590864 |
hjk1030 |
C |
Dec. 10, 2019, 12:57 p.m. |
OK |
GNU C++17 |
TESTS |
37 |
139 |
23654400 |
|
2800 |
47862439 |
tkj |
C |
Jan. 3, 2019, 7:13 a.m. |
OK |
GNU C++17 |
TESTS |
37 |
139 |
28262400 |
|
2800 |
56756473 |
vjudge3 |
C |
July 9, 2019, 2:07 p.m. |
OK |
GNU C++17 |
TESTS |
37 |
140 |
18944000 |
|
2800 |
46677167 |
vjudge2 |
C |
Dec. 6, 2018, 10:23 a.m. |
OK |
GNU C++17 |
TESTS |
37 |
140 |
19763200 |
|
2800 |
41909481 |
vjudge1 |
C |
Aug. 20, 2018, 4:44 p.m. |
OK |
GNU C++17 |
TESTS |
37 |
140 |
52531200 |
|
2800 |
46677155 |
TABball |
C |
Dec. 6, 2018, 10:22 a.m. |
OK |
GNU C++17 |
TESTS |
37 |
155 |
19763200 |
|
2800 |
58698832 |
tsyr8924503 |
C |
Aug. 13, 2019, 7:06 a.m. |
OK |
GNU C++17 |
TESTS |
37 |
155 |
27750400 |
|
2800 |
36985725 |
douglascunha |
C |
April 5, 2018, 2:32 a.m. |
OK |
Java 8 |
TESTS |
37 |
1622 |
156160000 |
|
2800 |
17828275 |
AlexFetisov |
C |
May 10, 2016, 7:09 a.m. |
OK |
Java 8 |
TESTS |
37 |
1668 |
156057600 |
|
2800 |
41581452 |
vjudge3 |
C |
Aug. 14, 2018, 8:18 a.m. |
OK |
MS C++ |
TESTS |
37 |
202 |
36147200 |
|
2800 |
41669235 |
lucyanna2018 |
C |
Aug. 17, 2018, 3:14 a.m. |
OK |
MS C++ |
TESTS |
37 |
264 |
10444800 |
|
2800 |
48783713 |
vjudge2 |
C |
Jan. 23, 2019, 7:56 a.m. |
OK |
MS C++ |
TESTS |
37 |
421 |
86323200 |
|
2800 |
59268877 |
vjudge4 |
C |
Aug. 22, 2019, 11:54 a.m. |
OK |
MS C++ |
TESTS |
37 |
498 |
212684800 |
|
2800 |
59268917 |
vjudge2 |
C |
Aug. 22, 2019, 11:55 a.m. |
OK |
MS C++ |
TESTS |
37 |
561 |
107622400 |
|
2800 |
59259327 |
vjudge1 |
C |
Aug. 22, 2019, 7:56 a.m. |
OK |
MS C++ |
TESTS |
37 |
670 |
260710400 |
|
2800 |
remove filters
Back to search problems