Codeforces Round 524 (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
1080 Codeforces Round 524 (Div. 2) FINISHED False 8100 188778299 Nov. 24, 2018, 7:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4058 ) C Masha and two friends PROGRAMMING implementation 1600

B'Recently, Masha was presented with a chessboard with a height of n and a width of m . The rows on the chessboard are numbered from 1 to n from bottom to top. The columns are numbered from 1 to m from left to right. Therefore, each cell can be specified with the coordinates (x,y) , where x is the column number, and y is the row number (do not mix up). Let us call a rectangle with coordinates (a,b,c,d) a rectangle lower left point of which has coordinates (a,b) , and the upper right one -- (c,d) . The chessboard is painted black and white as follows: Masha was very happy with the gift and, therefore, invited her friends Maxim and Denis to show off. The guys decided to make her a treat -- they bought her a can of white and a can of black paint, so that if the old board deteriorates, it can be repainted. When they came to Masha, something unpleasant happened: first, Maxim went over the threshold and spilled white paint on the rectangle (x_1,y_1,x_2,y_2) . Then after him Denis spilled black paint on the rectangle (x_3,y_3,x_4,y_4) . To spill paint of color color onto a certain rectangle means that all the cells that belong to the given rectangle become color . The cell dyeing is superimposed on each other (if at first some cell is spilled with white paint and then with black one, then its color will be black). Masha was shocked! She drove away from the guests and decided to find out how spoiled the gift was. For this, she needs to know the number of cells of white and black color. Help her find these numbers! The first line contains a single integer t ( 1 <= t <= 10^3 ) -- the number of test cases. Each of them is described in the following format: The first line contains two integers n and m ( 1 <= n,m <= 10^9 ) -- the size of the board. The second line contains four integers x_1 , y_1 , x_2 , y_2 ( 1 <= x_1 <= '...

Tutorials

Codeforces Round #524 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46394483 Flager_Lee C Nov. 30, 2018, 8:18 a.m. OK Clang++17 Diagnostics TESTS 50 109 0 1600
46283836 ruban C Nov. 27, 2018, 2:50 p.m. OK Delphi TESTS 50 61 35328000 1600
46835870 dblark C Dec. 10, 2018, 2:15 a.m. OK FPC TESTS 50 31 0 1600
46891778 khoa101003 C Dec. 11, 2018, 6:38 a.m. OK FPC TESTS 50 31 0 1600
46158989 dblark C Nov. 24, 2018, 9:06 a.m. OK FPC TESTS 50 46 0 1600
46741359 vjudge5 C Dec. 8, 2018, 2:54 a.m. OK FPC TESTS 50 46 0 1600
46741337 vjudge1 C Dec. 8, 2018, 2:52 a.m. OK FPC TESTS 50 46 0 1600
46894234 luogu_bot3 C Dec. 11, 2018, 8:14 a.m. OK FPC TESTS 50 46 102400 1600
46192427 AnimeshSinha1309 C Nov. 25, 2018, 6:15 a.m. OK GNU C11 TESTS 50 31 0 1600
46204906 shreya_2004 C Nov. 25, 2018, 1:40 p.m. OK GNU C11 TESTS 50 31 0 1600
46162453 alexdavid.k7 C Nov. 24, 2018, 9:40 a.m. OK GNU C11 TESTS 50 31 0 1600
46180526 zarif_2002 C Nov. 24, 2018, 5:38 p.m. OK GNU C11 TESTS 50 31 0 1600
46161619 jjong25 C Nov. 24, 2018, 9:32 a.m. OK GNU C11 TESTS 50 46 0 1600
46285976 SilverFire C Nov. 27, 2018, 4:13 p.m. OK GNU C11 TESTS 50 46 0 1600
46287717 tkhabia2303 C Nov. 27, 2018, 5:22 p.m. OK GNU C11 TESTS 50 46 0 1600
46819360 AnshulP10 C Dec. 9, 2018, 2:13 p.m. OK GNU C11 TESTS 50 46 0 1600
50238978 vjudge5 C Feb. 20, 2019, 12:08 p.m. OK GNU C11 TESTS 50 46 0 1600
47779061 xukuan C Dec. 31, 2018, 6:46 a.m. OK GNU C++11 TESTS 50 30 0 1600
46160002 C20180602 C Nov. 24, 2018, 9:17 a.m. OK GNU C++11 TESTS 50 30 0 1600
66411964 Paladnix C Dec. 6, 2019, 3:38 p.m. OK GNU C++11 TESTS 50 31 0 1600
66402915 acscript C Dec. 6, 2019, 12:49 p.m. OK GNU C++11 TESTS 50 31 0 1600
69074587 acscript C Jan. 19, 2020, 1:59 a.m. OK GNU C++11 TESTS 50 31 0 1600
69074723 acscript C Jan. 19, 2020, 2:06 a.m. OK GNU C++11 TESTS 50 31 0 1600
69074774 acscript C Jan. 19, 2020, 2:08 a.m. OK GNU C++11 TESTS 50 31 0 1600
69244909 LHQing C Jan. 21, 2020, 12:36 p.m. OK GNU C++11 TESTS 50 31 0 1600
67147640 vjudge3 C Dec. 18, 2019, 9:30 a.m. OK GNU C++11 TESTS 50 31 0 1600
66404206 acscript C Dec. 6, 2019, 1:12 p.m. OK GNU C++11 TESTS 50 31 0 1600
46922977 akSingh C Dec. 12, 2018, 6:31 a.m. OK GNU C++14 TESTS 50 15 0 1600
46310759 iLoveIOI C Nov. 28, 2018, 1:02 p.m. OK GNU C++14 TESTS 50 30 0 1600
49386153 am1tbh47 C Feb. 3, 2019, 7 a.m. OK GNU C++14 TESTS 50 30 0 1600
48585849 flying_turtle C Jan. 19, 2019, 7:37 p.m. OK GNU C++14 TESTS 50 30 0 1600
48275651 vjudge4 C Jan. 12, 2019, 5:33 a.m. OK GNU C++14 TESTS 50 30 0 1600
47792434 tajirhas9 C Dec. 31, 2018, 2:19 p.m. OK GNU C++14 TESTS 50 30 0 1600
46967770 alechuang98 C Dec. 13, 2018, 12:15 p.m. OK GNU C++14 TESTS 50 30 0 1600
46785232 pipishrimp C Dec. 9, 2018, 5:58 a.m. OK GNU C++14 TESTS 50 30 0 1600
46643955 demor C Dec. 5, 2018, 11:14 a.m. OK GNU C++14 TESTS 50 30 0 1600
46282349 njp3e0_1l4584 C Nov. 27, 2018, 2:02 p.m. OK GNU C++14 TESTS 50 30 0 1600
46169698 kindanoob C Nov. 24, 2018, 12:19 p.m. OK GNU C++17 TESTS 50 15 0 1600
46270473 hdu17jealous C Nov. 27, 2018, 7:41 a.m. OK GNU C++17 TESTS 50 15 0 1600
46674898 knight_coder C Dec. 6, 2018, 9:12 a.m. OK GNU C++17 TESTS 50 15 0 1600
47916743 yoyo_tpz C Jan. 4, 2019, 3:10 p.m. OK GNU C++17 TESTS 50 15 307200 1600
59437125 achvanov C Aug. 25, 2019, 9:21 a.m. OK GNU C++17 TESTS 50 30 0 1600
67361668 Treehole C Dec. 21, 2019, 12:40 p.m. OK GNU C++17 TESTS 50 30 0 1600
53193873 0513133171 C April 23, 2019, 2:12 p.m. OK GNU C++17 TESTS 50 30 0 1600
53284808 vjudge3 C April 25, 2019, 1:29 p.m. OK GNU C++17 TESTS 50 30 0 1600
56697210 vjudge4 C July 8, 2019, 7:35 a.m. OK GNU C++17 TESTS 50 30 0 1600
50282682 wj123 C Feb. 21, 2019, 1:25 p.m. OK GNU C++17 TESTS 50 30 0 1600
46185279 davidguandev C Nov. 24, 2018, 9:04 p.m. OK Go TESTS 50 46 0 1600
46157487 2008061626 C Nov. 24, 2018, 8:52 a.m. OK Go TESTS 50 46 0 1600
46401344 sl0th C Nov. 30, 2018, 12:24 p.m. OK Haskell TESTS 50 93 8499200 1600
48043046 SpargelTarzan C Jan. 6, 2019, 9:43 p.m. OK Java 8 TESTS 50 124 0 1600
56715107 o.radwan C July 8, 2019, 2:20 p.m. OK Java 8 TESTS 50 124 0 1600
55712436 tapopadma C June 18, 2019, 10:58 a.m. OK Java 8 TESTS 50 124 0 1600
48668725 sas4eka C Jan. 21, 2019, 9:27 a.m. OK Java 8 TESTS 50 124 0 1600
47891153 Kavi.Prajapati C Jan. 4, 2019, 6:39 a.m. OK Java 8 TESTS 50 124 0 1600
47817523 YahiaBadr C Jan. 1, 2019, 3:26 p.m. OK Java 8 TESTS 50 124 0 1600
47529272 bhautik_77 C Dec. 26, 2018, 5:48 p.m. OK Java 8 TESTS 50 124 0 1600
46998979 hagar_yasser C Dec. 14, 2018, 10:25 a.m. OK Java 8 TESTS 50 124 0 1600
46293088 kessido C Nov. 27, 2018, 9:43 p.m. OK Java 8 TESTS 50 124 0 1600
46203875 NMouad21 C Nov. 25, 2018, 1:07 p.m. OK Java 8 TESTS 50 124 0 1600
46179906 Svyat C Nov. 24, 2018, 5:16 p.m. OK Kotlin TESTS 50 234 1331200 1600
46163306 thetansquared C Nov. 24, 2018, 9:46 a.m. OK Mono C# TESTS 50 61 1536000 1600
46154870 eki C Nov. 24, 2018, 8:25 a.m. OK Mono C# TESTS 50 62 1433600 1600
46158164 IleksaNott C Nov. 24, 2018, 8:58 a.m. OK Mono C# TESTS 50 62 1536000 1600
46154169 Zvigintsev C Nov. 24, 2018, 8:19 a.m. OK Mono C# TESTS 50 77 4300800 1600
46186179 Coder_D C Nov. 24, 2018, 10:11 p.m. OK Mono C# TESTS 50 77 5632000 1600
46156231 kuuso C Nov. 24, 2018, 8:39 a.m. OK Mono C# TESTS 50 78 1638400 1600
46200903 omikad C Nov. 25, 2018, 11:18 a.m. OK Mono C# TESTS 50 78 6656000 1600
46305646 vjudge2 C Nov. 28, 2018, 10:08 a.m. OK MS C++ TESTS 50 30 0 1600
55090368 vjudge5 C June 4, 2019, 2:16 p.m. OK MS C++ TESTS 50 31 0 1600
67651266 vjudge5 C Dec. 26, 2019, 12:14 p.m. OK MS C++ TESTS 50 31 0 1600
65905662 vjudge4 C Nov. 28, 2019, 10:47 a.m. OK MS C++ TESTS 50 31 0 1600
56712359 vjudge3 C July 8, 2019, 1:11 p.m. OK MS C++ TESTS 50 31 0 1600
56697851 vjudge2 C July 8, 2019, 7:50 a.m. OK MS C++ TESTS 50 31 0 1600
55090012 vjudge2 C June 4, 2019, 2:08 p.m. OK MS C++ TESTS 50 31 0 1600
54524627 vjudge3 C May 23, 2019, 1:54 p.m. OK MS C++ TESTS 50 31 0 1600
54338251 vjudge4 C May 18, 2019, 9:07 a.m. OK MS C++ TESTS 50 31 0 1600
51379789 xzh3ha C March 16, 2019, 3:42 p.m. OK MS C++ TESTS 50 31 0 1600
50676379 wellox C March 2, 2019, 9:27 a.m. OK MS C++ 2017 TESTS 50 31 0 1600
56160773 0icq C June 27, 2019, 12:14 p.m. OK MS C++ 2017 TESTS 50 46 0 1600
52375332 AleksanderBalobanov C April 6, 2019, 8:01 a.m. OK MS C++ 2017 TESTS 50 46 0 1600
46229989 sk0 C Nov. 25, 2018, 8:16 p.m. OK Ocaml TESTS 50 31 204800 1600
46179317 physis C Nov. 24, 2018, 4:54 p.m. OK Perl TESTS 50 77 102400 1600
46177624 physis C Nov. 24, 2018, 4:02 p.m. OK Perl TESTS 50 93 102400 1600
46186093 katalama C Nov. 24, 2018, 10:02 p.m. OK PHP TESTS 50 124 512000 1600
49825102 Mukundan314 C Feb. 12, 2019, 11:07 a.m. OK PyPy 2 TESTS 50 171 1024000 1600
46154622 c1729 C Nov. 24, 2018, 8:23 a.m. OK PyPy 2 TESTS 50 187 1126400 1600
46150450 Lewin C Nov. 24, 2018, 7:53 a.m. OK PyPy 2 TESTS 50 249 2867200 1600
46182250 aeternalis1 C Nov. 24, 2018, 6:42 p.m. OK PyPy 2 TESTS 50 264 2662400 1600
46299000 suntan321321 C Nov. 28, 2018, 6:07 a.m. OK PyPy 2 TESTS 50 265 3379200 1600
46170762 ItsLastDay C Nov. 24, 2018, 12:45 p.m. OK PyPy 2 TESTS 50 265 3379200 1600
47862000 anshuman16423 C Jan. 3, 2019, 6:51 a.m. OK PyPy 2 TESTS 50 280 2969600 1600
46161349 _kawaii_neko_ C Nov. 24, 2018, 9:29 a.m. OK PyPy 2 TESTS 50 312 2969600 1600
46162226 frederika C Nov. 24, 2018, 9:38 a.m. OK PyPy 2 TESTS 50 342 1945600 1600
46430018 Stephan C Dec. 1, 2018, 4:47 a.m. OK PyPy 3 TESTS 50 202 2457600 1600
46157694 titia C Nov. 24, 2018, 8:54 a.m. OK PyPy 3 TESTS 50 202 2560000 1600
46160075 lintao C Nov. 24, 2018, 9:17 a.m. OK PyPy 3 TESTS 50 233 3379200 1600
57851108 brosucks C July 27, 2019, 1:10 p.m. OK PyPy 3 TESTS 50 233 4198400 1600
46159566 zootyducky C Nov. 24, 2018, 9:12 a.m. OK PyPy 3 TESTS 50 249 2867200 1600
46156263 Firepaw C Nov. 24, 2018, 8:39 a.m. OK PyPy 3 TESTS 50 280 2867200 1600
46253358 nobe0716 C Nov. 26, 2018, 3:17 p.m. OK PyPy 3 TESTS 50 280 4505600 1600
69196426 Rahul_Anand C Jan. 20, 2020, 3:04 p.m. OK PyPy 3 TESTS 50 280 5836800 1600
46154286 justinz2018 C Nov. 24, 2018, 8:20 a.m. OK PyPy 3 TESTS 50 295 4505600 1600
46151778 meooow C Nov. 24, 2018, 8:01 a.m. OK PyPy 3 TESTS 50 296 6348800 1600
46229406 Juve45 C Nov. 25, 2018, 8:03 p.m. OK Python 2 TESTS 50 186 0 1600
46160534 mihir_94 C Nov. 24, 2018, 9:22 a.m. OK Python 2 TESTS 50 187 102400 1600
46184039 EoinDavey C Nov. 24, 2018, 7:57 p.m. OK Python 2 TESTS 50 202 102400 1600
46150516 nwi C Nov. 24, 2018, 7:53 a.m. OK Python 2 TESTS 50 218 0 1600
47533878 nealzane C Dec. 26, 2018, 10:06 p.m. OK Python 2 TESTS 50 233 0 1600
46165585 TheDreamer979 C Nov. 24, 2018, 9:48 a.m. OK Python 2 TESTS 50 233 0 1600
46158401 muntasir C Nov. 24, 2018, 9 a.m. OK Python 2 TESTS 50 248 0 1600
46158120 arman.t C Nov. 24, 2018, 8:58 a.m. OK Python 2 TESTS 50 249 0 1600
46154940 ManasG C Nov. 24, 2018, 8:26 a.m. OK Python 2 TESTS 50 311 5324800 1600
46196632 candle C Nov. 25, 2018, 8:42 a.m. OK Python 3 TESTS 50 124 102400 1600
48048858 nowyyz C Jan. 7, 2019, 7 a.m. OK Python 3 TESTS 50 124 716800 1600
46558859 mplaton C Dec. 3, 2018, 6:53 p.m. OK Python 3 TESTS 50 139 102400 1600
46576552 problem_solved C Dec. 4, 2018, 9 a.m. OK Python 3 TESTS 50 139 307200 1600
46842665 ..vince C Dec. 10, 2018, 8:47 a.m. OK Python 3 TESTS 50 140 0 1600
46236088 Tauzn C Nov. 26, 2018, 2:59 a.m. OK Python 3 TESTS 50 140 0 1600
46198351 eastjp C Nov. 25, 2018, 9:43 a.m. OK Python 3 TESTS 50 140 0 1600
46191887 1612190130 C Nov. 25, 2018, 5:52 a.m. OK Python 3 TESTS 50 140 0 1600
46191549 strint C Nov. 25, 2018, 5:35 a.m. OK Python 3 TESTS 50 140 0 1600
46187737 Shiisui C Nov. 25, 2018, 12:50 a.m. OK Python 3 TESTS 50 140 0 1600
46155931 geckods C Nov. 24, 2018, 8:36 a.m. OK Ruby TESTS 50 93 102400 1600
46165932 megachuhancer C Nov. 24, 2018, 9:49 a.m. OK Ruby TESTS 50 109 102400 1600
46417434 StasDash C Nov. 30, 2018, 8:06 p.m. OK Rust TESTS 50 46 0 1600
46255895 nikitoz C Nov. 26, 2018, 4:41 p.m. OK Rust TESTS 50 46 0 1600
46223598 Dx18 C Nov. 25, 2018, 6:26 p.m. OK Rust TESTS 50 46 0 1600
46822658 ivajloip C Dec. 9, 2018, 4:17 p.m. OK Rust TESTS 50 46 307200 1600
46466181 kobae964 C Dec. 2, 2018, 3:23 a.m. OK Rust TESTS 50 46 105267200 1600
46156378 yakamoto C Nov. 24, 2018, 8:40 a.m. OK Scala TESTS 50 452 0 1600
46157779 Odeen C Nov. 24, 2018, 8:54 a.m. OK Scala TESTS 50 810 0 1600

remove filters

Back to search problems