Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + 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
1060 Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) FINISHED False 9000 193186499 Oct. 4, 2018, 7:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4906 ) C Maximum Subrectangle PROGRAMMING binary search implementation two pointers 1600

B'You are given two arrays a and b of positive integers, with length n and m respectively. Let c be an n x m matrix, where c_{i,j} = a_i cdot b_j . You need to find a subrectangle of the matrix c such that the sum of its elements is at most x , and its area (the total number of elements) is the largest possible. Formally, you need to find the largest number s such that it is possible to choose integers x_1, x_2, y_1, y_2 subject to 1 <= q x_1 <= q x_2 <= q n , 1 <= q y_1 <= q y_2 <= q m , (x_2 - x_1 + 1) x (y_2 - y_1 + 1) = s , and sum_{i=x_1}^{x_2}{ sum_{j=y_1}^{y_2}{c_{i,j}}} <= q x. The first line contains two integers n and m ( 1 <= q n, m <= q 2000 ). The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 2000 ). The third line contains m integers b_1, b_2, ldots, b_m ( 1 <= q b_i <= q 2000 ). The fourth line contains a single integer x ( 1 <= q x <= q 2 cdot 10^{9} ). If it is possible to choose four integers x_1, x_2, y_1, y_2 such that 1 <= q x_1 <= q x_2 <= q n , 1 <= q y_1 <= q y_2 <= q m , and sum_{i=x_1}^{x_2}{ sum_{j=y_1}^{y_2}{c_{i,j}}} <= q x , output the largest value of (x_2 - x_1 + 1) x (y_2 - y_1 + 1) among all such quadruplets, otherwise output 0 . Matrix from the first sample and the chosen subrectangle (of blue color): Matrix from the second sample and the chosen subrectangle (of blue color): '...

Tutorials

User editorial for Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47598443 autotest C Dec. 27, 2018, 8:04 p.m. OK Clang++17 Diagnostics TESTS 87 1746 195481600 1600
43767484 fluffyowl C Oct. 4, 2018, 7:44 a.m. OK D TESTS 87 61 4198400 1600
43798020 ruban C Oct. 4, 2018, 4:17 p.m. OK Delphi TESTS 87 265 308940800 1600
43922250 cbl_nhathuy C Oct. 7, 2018, 1:31 a.m. OK FPC TESTS 87 31 102400 1600
43818860 vdanh7277 C Oct. 5, 2018, 7:08 a.m. OK FPC TESTS 87 62 0 1600
45090296 luogu_bot3 C Oct. 30, 2018, 9:15 a.m. OK FPC TESTS 87 265 102400 1600
43770829 HolyPush C Oct. 4, 2018, 8:05 a.m. OK FPC TESTS 87 312 102400 1600
43803305 TShT C Oct. 4, 2018, 6:25 p.m. OK FPC TESTS 87 374 12800000 1600
44551026 christian_solis C Oct. 19, 2018, 3:19 p.m. OK GNU C11 TESTS 87 31 0 1600
44422866 rominalm C Oct. 17, 2018, 1:06 a.m. OK GNU C11 TESTS 87 31 0 1600
44550310 AlanAlbert C Oct. 19, 2018, 3:04 p.m. OK GNU C11 TESTS 87 31 0 1600
57258244 sansen C July 18, 2019, 3:30 a.m. OK GNU C11 TESTS 87 31 0 1600
43882889 eycia C Oct. 6, 2018, 6:08 a.m. OK GNU C11 TESTS 87 31 102400 1600
44535510 RamonV C Oct. 19, 2018, 8:43 a.m. OK GNU C11 TESTS 87 31 102400 1600
44521712 prueba_LD C Oct. 18, 2018, 9:32 p.m. OK GNU C11 TESTS 87 31 102400 1600
44521357 Alejandro2971 C Oct. 18, 2018, 8:54 p.m. OK GNU C11 TESTS 87 31 102400 1600
44524628 JuanMelendres C Oct. 19, 2018, 12:43 a.m. OK GNU C11 TESTS 87 31 32153600 1600
44537496 Isser C Oct. 19, 2018, 9:41 a.m. OK GNU C11 TESTS 87 31 32153600 1600
48191613 gpoesia C Jan. 10, 2019, 6:16 p.m. OK GNU C++11 TESTS 87 31 0 1600
47806400 luogu_bot3 C Jan. 1, 2019, 7:38 a.m. OK GNU C++11 TESTS 87 31 0 1600
52737772 wAtcher2333 C April 14, 2019, 7:21 a.m. OK GNU C++11 TESTS 87 31 0 1600
53871865 floatery C May 8, 2019, 9:37 a.m. OK GNU C++11 TESTS 87 31 0 1600
63908657 ddh C Oct. 31, 2019, 7:27 a.m. OK GNU C++11 TESTS 87 31 0 1600
66437807 stratoes C Dec. 7, 2019, 6:52 a.m. OK GNU C++11 TESTS 87 31 0 1600
67016909 luogu_bot5 C Dec. 16, 2019, 11:45 a.m. OK GNU C++11 TESTS 87 31 0 1600
48820943 81179332 C Jan. 23, 2019, 3:07 p.m. OK GNU C++11 TESTS 87 31 0 1600
48410089 luogu_bot5 C Jan. 15, 2019, 7:10 a.m. OK GNU C++11 TESTS 87 31 0 1600
48311915 luogu_bot1 C Jan. 13, 2019, 3:02 a.m. OK GNU C++11 TESTS 87 31 0 1600
47537872 harshit2202 C Dec. 27, 2018, 4:15 a.m. OK GNU C++14 TESTS 87 31 0 1600
59641560 mth1908 C Aug. 29, 2019, 2:08 a.m. OK GNU C++14 TESTS 87 31 0 1600
62502942 gurwika.dev C Oct. 13, 2019, 11:20 a.m. OK GNU C++14 TESTS 87 31 0 1600
57060641 Nova C July 14, 2019, 5:45 p.m. OK GNU C++14 TESTS 87 31 0 1600
55597038 iShibly C June 15, 2019, 3:39 p.m. OK GNU C++14 TESTS 87 31 0 1600
54819520 igorqs C May 30, 2019, 12:35 a.m. OK GNU C++14 TESTS 87 31 0 1600
52218140 zebas C April 2, 2019, 4:23 a.m. OK GNU C++14 TESTS 87 31 0 1600
51779267 MS1908 C March 24, 2019, 2:51 a.m. OK GNU C++14 TESTS 87 31 0 1600
51203343 mayaohua2003 C March 12, 2019, 2:24 a.m. OK GNU C++14 TESTS 87 31 0 1600
50264329 xyq0220 C Feb. 21, 2019, 3:28 a.m. OK GNU C++14 TESTS 87 31 0 1600
53619161 Jenius C May 1, 2019, 2:55 p.m. OK GNU C++17 TESTS 87 31 0 1600
58879233 KrK C Aug. 15, 2019, 7:44 p.m. OK GNU C++17 TESTS 87 31 0 1600
58545199 pizdato C Aug. 10, 2019, 4:14 p.m. OK GNU C++17 TESTS 87 31 0 1600
54564869 LongChampion C May 24, 2019, 3:50 p.m. OK GNU C++17 TESTS 87 31 0 1600
54003255 wasyl C May 11, 2019, 5:50 p.m. OK GNU C++17 TESTS 87 31 0 1600
68326847 Rahul_cpp C Jan. 6, 2020, 5:11 p.m. OK GNU C++17 TESTS 87 31 0 1600
65918717 flashmt C Nov. 28, 2019, 3:34 p.m. OK GNU C++17 TESTS 87 31 0 1600
63394152 vjudge5 C Oct. 25, 2019, 4:08 p.m. OK GNU C++17 TESTS 87 31 0 1600
61008631 alhiris C Sept. 21, 2019, 11:44 a.m. OK GNU C++17 TESTS 87 31 0 1600
60515816 ipaljak C Sept. 14, 2019, 6:31 a.m. OK GNU C++17 TESTS 87 31 0 1600
47962592 davidguandev C Jan. 5, 2019, 10:16 a.m. OK Go TESTS 87 280 0 1600
45115969 peter_jerry_ye C Oct. 30, 2018, 9:28 p.m. OK Haskell TESTS 87 483 8499200 1600
43816357 karoyakani C Oct. 5, 2018, 5:35 a.m. OK Haskell TESTS 87 1466 241868800 1600
66517518 Mirbek_aka C Dec. 8, 2019, 7:47 p.m. OK Java 11 TESTS 87 265 18841600 1600
45504306 Srinivasa_Ramanujan C Nov. 10, 2018, 9:31 a.m. OK Java 8 TESTS 87 124 0 1600
58096015 goyalakash1997 C July 31, 2019, 7:53 p.m. OK Java 8 TESTS 87 124 0 1600
46578697 kusomushi C Dec. 4, 2018, 10:12 a.m. OK Java 8 TESTS 87 124 0 1600
46529112 donli C Dec. 3, 2018, 2:55 a.m. OK Java 8 TESTS 87 124 0 1600
45408296 ivplay C Nov. 7, 2018, 10:48 a.m. OK Java 8 TESTS 87 124 0 1600
45174860 xwchen C Nov. 1, 2018, 2:16 p.m. OK Java 8 TESTS 87 124 0 1600
44100913 sooraj10 C Oct. 11, 2018, 5:48 a.m. OK Java 8 TESTS 87 124 0 1600
59808366 Ikari_stream C Aug. 31, 2019, 12:46 p.m. OK Java 8 TESTS 87 139 0 1600
49377020 younesbmz C Feb. 2, 2019, 8:44 p.m. OK Java 8 TESTS 87 139 0 1600
68401122 sushant_verma C Jan. 8, 2020, 1:12 p.m. OK Java 8 TESTS 87 140 0 1600
43807452 raynald C Oct. 4, 2018, 8:35 p.m. OK Kotlin TESTS 87 233 716800 1600
43814840 witchu C Oct. 5, 2018, 4:25 a.m. OK Mono C# TESTS 87 62 307200 1600
43771658 eki C Oct. 4, 2018, 8:12 a.m. OK Mono C# TESTS 87 62 307200 1600
43761061 leign C Oct. 4, 2018, 7:16 a.m. OK Mono C# TESTS 87 77 307200 1600
43792448 fr0st C Oct. 4, 2018, 2:17 p.m. OK Mono C# TESTS 87 233 4198400 1600
43790691 omikad C Oct. 4, 2018, 1:44 p.m. OK Mono C# TESTS 87 1964 129126400 1600
44058710 aytio C Oct. 10, 2018, 3:46 a.m. OK MS C++ TESTS 87 31 0 1600
43945275 vjudge1 C Oct. 7, 2018, 1:25 p.m. OK MS C++ TESTS 87 31 0 1600
45545737 vjudge1 C Nov. 11, 2018, 12:24 a.m. OK MS C++ TESTS 87 31 0 1600
44470951 vjudge2 C Oct. 18, 2018, 6:20 a.m. OK MS C++ TESTS 87 31 0 1600
44535778 vjudge5 C Oct. 19, 2018, 8:50 a.m. OK MS C++ TESTS 87 31 102400 1600
44174485 xiaotianyao C Oct. 12, 2018, 8:04 a.m. OK MS C++ TESTS 87 31 102400 1600
44113047 vjudge4 C Oct. 11, 2018, 12:49 p.m. OK MS C++ TESTS 87 31 409600 1600
43882119 vjudge2 C Oct. 6, 2018, 5:47 a.m. OK MS C++ TESTS 87 31 409600 1600
44467023 vjudge5 C Oct. 18, 2018, 3:22 a.m. OK MS C++ TESTS 87 31 24064000 1600
44465494 vjudge3 C Oct. 18, 2018, 1:30 a.m. OK MS C++ TESTS 87 46 0 1600
63757934 vjudge5 C Oct. 30, 2019, 1:16 a.m. OK MS C++ 2017 TESTS 87 31 160358400 1600
63757803 lcjWA C Oct. 30, 2019, 1:08 a.m. OK MS C++ 2017 TESTS 87 46 102400 1600
63689366 vjudge5 C Oct. 29, 2019, 1:18 a.m. OK MS C++ 2017 TESTS 87 46 409600 1600
63778298 vjudge2 C Oct. 30, 2019, 10:15 a.m. OK MS C++ 2017 TESTS 87 46 160358400 1600
63757881 lcjWA C Oct. 30, 2019, 1:13 a.m. OK MS C++ 2017 TESTS 87 46 160358400 1600
52209855 Still_Theory C April 1, 2019, 7:05 p.m. OK MS C++ 2017 TESTS 87 93 102400 1600
45501934 KGYYT C Nov. 10, 2018, 8:08 a.m. OK PascalABC.NET TESTS 87 61 716800 1600
43931191 fruha C Oct. 7, 2018, 7:22 a.m. OK PascalABC.NET TESTS 87 62 716800 1600
44685297 test616.cpp C Oct. 22, 2018, 9:07 a.m. OK PyPy 2 TESTS 87 311 1638400 1600
56274224 shanu_im C June 29, 2019, 1:27 p.m. OK PyPy 2 TESTS 87 326 1638400 1600
43783371 c1729 C Oct. 4, 2018, 11:22 a.m. OK PyPy 2 TESTS 87 358 1433600 1600
43770837 Onesh0t C Oct. 4, 2018, 8:05 a.m. OK PyPy 2 TESTS 87 389 1126400 1600
43830222 cgfs10000 C Oct. 5, 2018, 1:41 p.m. OK PyPy 2 TESTS 87 404 1433600 1600
43761353 astrom.lars C Oct. 4, 2018, 7:18 a.m. OK PyPy 2 TESTS 87 436 1228800 1600
43766834 pavanyellow123 C Oct. 4, 2018, 7:40 a.m. OK PyPy 2 TESTS 87 701 3276800 1600
43783980 Onesh0t C Oct. 4, 2018, 11:33 a.m. OK PyPy 2 TESTS 87 763 19558400 1600
47825382 whatshisbucket C Jan. 1, 2019, 9:58 p.m. OK PyPy 3 TESTS 87 156 1024000 1600
45985390 Firepaw C Nov. 20, 2018, 6:06 a.m. OK PyPy 3 TESTS 87 202 1740800 1600
52994895 bupt.wc C April 19, 2019, 2:54 a.m. OK PyPy 3 TESTS 87 280 1126400 1600
44261187 tranphuminhbkhn C Oct. 13, 2018, 2:33 p.m. OK PyPy 3 TESTS 87 280 1740800 1600
51365461 sanvi_kiit C March 16, 2019, 9:22 a.m. OK PyPy 3 TESTS 87 280 1843200 1600
58143026 brosucks C Aug. 1, 2019, 7:08 p.m. OK PyPy 3 TESTS 87 280 2764800 1600
66631418 yanpekkinen C Dec. 11, 2019, 11:19 a.m. OK PyPy 3 TESTS 87 296 2560000 1600
43830006 cgfs10000 C Oct. 5, 2018, 1:35 p.m. OK PyPy 3 TESTS 87 358 1331200 1600
43896871 Savit_Gupta C Oct. 6, 2018, 11:12 a.m. OK PyPy 3 TESTS 87 374 1228800 1600
68402880 latter0206 C Jan. 8, 2020, 1:48 p.m. OK PyPy 3 TESTS 87 436 6246400 1600
43862879 Gol_D C Oct. 5, 2018, 4:55 p.m. OK Python 3 TESTS 87 1497 307200 1600
43768659 runnie C Oct. 4, 2018, 7:51 a.m. OK Python 3 TESTS 87 1575 307200 1600
43800563 Felerius C Oct. 4, 2018, 5:14 p.m. OK Rust TESTS 87 46 1024000 1600
43797027 clrcldy C Oct. 4, 2018, 3:56 p.m. OK Rust TESTS 87 561 921600 1600
44552040 yakamoto C Oct. 19, 2018, 3:39 p.m. OK Scala TESTS 87 483 0 1600
51337307 .counter C March 15, 2019, 2:44 p.m. OK Scala TESTS 87 592 204800 1600
51337420 .counter C March 15, 2019, 2:47 p.m. OK Scala TESTS 87 686 204800 1600

remove filters

Back to search problems