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 |
1054
|
Mail.Ru Cup 2018 Round 1 |
FINISHED |
False |
9000 |
191942699 |
Oct. 18, 2018, 4:35 p.m. |
Problems
B"Egor came up with a new chips puzzle and suggests you to play. The puzzle has the form of a table with n rows and m columns, each cell can contain several black or white chips placed in a row. Thus, the state of the cell can be described by a string consisting of characters '0' (a white chip) and '1' (a black chip), possibly empty, and the whole puzzle can be described as a table, where each cell is a string of zeros and ones. The task is to get from one state of the puzzle some other state. To do this, you can use the following operation. Egor came up with two states of the table for you: the initial state and the final one. It is guaranteed that the number of zeros and ones in the tables are the same. Your goal is with several operations get the final state from the initial state. Of course, Egor does not want the number of operations to be very large. Let's denote as s the number of characters in each of the tables (which are the same). Then you should use no more than 4 cdot s operations. The first line contains two integers n and m ( 2 <= q n, m <= q 300 ) -- the number of rows and columns of the table, respectively. The following n lines describe the initial state of the table in the following format: each line contains m non-empty strings consisting of zeros and ones. In the i -th of these lines, the j -th string is the string written at the cell (i, j) . The rows are enumerated from 1 to n , the columns are numerated from 1 to m . The following n lines describe the final state of the table in the same format. Let's denote the total length of strings in the initial state as s . It is guaranteed that s <= q 100 , 000 . It is also guaranteed that the numbers of zeros and ones coincide in the initial and final states. On the first line print q -- the number of operations used. You should find such a solution that 0 <= q q <= q 4 cdot s"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
44515676 |
Gassa |
E |
Oct. 18, 2018, 6:20 p.m. |
OK |
D |
TESTS |
100 |
374 |
22425600 |
|
2400 |
45673833 |
zhouyuyang |
E |
Nov. 13, 2018, 12:06 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
124 |
7270400 |
|
2400 |
44512054 |
pparys |
E |
Oct. 18, 2018, 5:46 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
124 |
9011200 |
|
2400 |
44542353 |
yao11617 |
E |
Oct. 19, 2018, 12:03 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
140 |
11264000 |
|
2400 |
44511198 |
Shef |
E |
Oct. 18, 2018, 5:40 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
140 |
26521600 |
|
2400 |
44518522 |
Alex_2oo8 |
E |
Oct. 18, 2018, 6:53 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
156 |
17305600 |
|
2400 |
44515662 |
voover |
E |
Oct. 18, 2018, 6:20 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
156 |
19456000 |
|
2400 |
45857010 |
Jiangkangping |
E |
Nov. 17, 2018, 2:48 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
170 |
113664000 |
|
2400 |
56631747 |
little_misfortune |
E |
July 6, 2019, 4:45 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
171 |
15872000 |
|
2400 |
44531660 |
comfi |
E |
Oct. 19, 2018, 6:48 a.m. |
OK |
GNU C++11 |
TESTS |
100 |
171 |
18124800 |
|
2400 |
44517097 |
leaomatheus |
E |
Oct. 18, 2018, 6:36 p.m. |
OK |
GNU C++11 |
TESTS |
100 |
171 |
20992000 |
|
2400 |
44518906 |
dragoon |
E |
Oct. 18, 2018, 6:58 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
140 |
15462400 |
|
2400 |
44737016 |
ankeshgupta007 |
E |
Oct. 23, 2018, 1:12 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
140 |
18739200 |
|
2400 |
44518769 |
Deemo |
E |
Oct. 18, 2018, 6:56 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
155 |
11571200 |
|
2400 |
44601022 |
Vercingetorix |
E |
Oct. 20, 2018, 2:25 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
155 |
15667200 |
|
2400 |
44513136 |
Batrr |
E |
Oct. 18, 2018, 5:56 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
155 |
16691200 |
|
2400 |
44510572 |
Kostroma |
E |
Oct. 18, 2018, 5:35 p.m. |
OK |
GNU C++14 |
TESTS |
100 |
155 |
20582400 |
|
2400 |
45951642 |
zzb111 |
E |
Nov. 19, 2018, 6:38 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
156 |
10649600 |
|
2400 |
44525084 |
Paniago |
E |
Oct. 19, 2018, 1:21 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
156 |
20070400 |
|
2400 |
44525366 |
Paniago |
E |
Oct. 19, 2018, 1:44 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
170 |
20070400 |
|
2400 |
44530335 |
WonderMouse |
E |
Oct. 19, 2018, 6:08 a.m. |
OK |
GNU C++14 |
TESTS |
100 |
171 |
15257600 |
|
2400 |
44751492 |
ReaLNero1 |
E |
Oct. 23, 2018, 8:11 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
124 |
13107200 |
|
2400 |
44517803 |
anpans |
E |
Oct. 18, 2018, 6:45 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
124 |
13107200 |
|
2400 |
44529754 |
xsc |
E |
Oct. 19, 2018, 5:48 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
140 |
9216000 |
|
2400 |
44519218 |
nuip |
E |
Oct. 18, 2018, 7:01 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
140 |
19353600 |
|
2400 |
44515562 |
Lollipop |
E |
Oct. 18, 2018, 6:19 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
155 |
9011200 |
|
2400 |
44523619 |
LiChenKoh |
E |
Oct. 18, 2018, 11:15 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
155 |
75366400 |
|
2400 |
46587692 |
congmingyige |
E |
Dec. 4, 2018, 2:04 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
171 |
7577600 |
|
2400 |
44573685 |
sp1cyChezz |
E |
Oct. 20, 2018, 6:04 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
171 |
14745600 |
|
2400 |
44760821 |
charliez |
E |
Oct. 24, 2018, 7:01 a.m. |
OK |
GNU C++17 |
TESTS |
100 |
171 |
15872000 |
|
2400 |
44512229 |
KrK |
E |
Oct. 18, 2018, 5:48 p.m. |
OK |
GNU C++17 |
TESTS |
100 |
171 |
16691200 |
|
2400 |
44515913 |
eatmore |
E |
Oct. 18, 2018, 6:23 p.m. |
OK |
Java 8 |
TESTS |
100 |
233 |
5632000 |
|
2400 |
44518307 |
kessido |
E |
Oct. 18, 2018, 6:51 p.m. |
OK |
Java 8 |
TESTS |
100 |
249 |
23040000 |
|
2400 |
68646772 |
dalt |
E |
Jan. 12, 2020, 9:20 a.m. |
OK |
Java 8 |
TESTS |
100 |
264 |
86425600 |
|
2400 |
44538847 |
fnch |
E |
Oct. 19, 2018, 10:25 a.m. |
OK |
Java 8 |
TESTS |
100 |
296 |
48230400 |
|
2400 |
44532968 |
Jeel_Vaishnav |
E |
Oct. 19, 2018, 7:28 a.m. |
OK |
Java 8 |
TESTS |
100 |
311 |
11571200 |
|
2400 |
44513504 |
uwi |
E |
Oct. 18, 2018, 5:59 p.m. |
OK |
Java 8 |
TESTS |
100 |
311 |
35225600 |
|
2400 |
44550651 |
Svyat |
E |
Oct. 19, 2018, 3:11 p.m. |
OK |
Java 8 |
TESTS |
100 |
311 |
35328000 |
|
2400 |
44613060 |
scoobydoo |
E |
Oct. 20, 2018, 9:30 p.m. |
OK |
Java 8 |
TESTS |
100 |
327 |
22425600 |
|
2400 |
44522134 |
mmaxio |
E |
Oct. 18, 2018, 9:53 p.m. |
OK |
Java 8 |
TESTS |
100 |
343 |
11366400 |
|
2400 |
44517732 |
mmaxio |
E |
Oct. 18, 2018, 6:44 p.m. |
OK |
Java 8 |
TESTS |
100 |
358 |
11366400 |
|
2400 |
44518445 |
alexey.enkov |
E |
Oct. 18, 2018, 6:52 p.m. |
OK |
Kotlin |
TESTS |
100 |
358 |
19353600 |
|
2400 |
44514088 |
wa1tz719 |
E |
Oct. 18, 2018, 6:05 p.m. |
OK |
MS C++ |
TESTS |
100 |
218 |
18944000 |
|
2400 |
44515617 |
Grevozin |
E |
Oct. 18, 2018, 6:19 p.m. |
OK |
PyPy 3 |
TESTS |
100 |
623 |
68300800 |
|
2400 |
remove filters
Back to search problems