VK Cup 2017 - Round 1

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
771 VK Cup 2017 - Round 1 FINISHED False 7200 241971899 March 18, 2017, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 499 ) E Bear and Rectangle Strips PROGRAMMING dp greedy 3000

B"Limak has a grid that consists of 2 rows and n columns. The j-th cell in the i-th row contains an integer ti, xe2 x80 x89j which can be positive, negative or zero. A non-empty rectangle of cells is called nice if and only if the sum of numbers in its cells is equal to 0. Limak wants to choose some nice rectangles and give them to his friends, as gifts. No two chosen rectangles should share a cell. What is the maximum possible number of nice rectangles Limak can choose? The first line of the input contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300 xe2 x80 x89000) -- the number of columns in the grid. The next two lines contain numbers in the grid. The i-th of those two lines contains n integers ti, xe2 x80 x891, xe2 x80 x89ti, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89ti, xe2 x80 x89n ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ti, xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Print one integer, denoting the maximum possible number of cell-disjoint nice rectangles. In the first sample, there are four nice rectangles: Limak can't choose all of them because they are not disjoint. He should take three nice rectangles: those denoted as blue frames on the drawings. In the second sample, it's optimal to choose six nice rectangles, each consisting of one cell with a number 0. In the third sample, the only nice rectangle is the whole grid -- the sum of all numbers is 0. Clearly, Limak can choose at most one nice rectangle, so the answer is 1. "...

Tutorials

VK Cup 2017 Round 1 and CF Round 405 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40982356 ReaLNero1 E July 30, 2018, 6:23 p.m. OK GNU C++ TESTS 104 171 20275200 3000
27772492 jiyutian E June 14, 2017, 10:50 a.m. OK GNU C++ TESTS 104 171 20275200 3000
27439673 jiyutian E May 30, 2017, 4:19 a.m. OK GNU C++ TESTS 104 171 20275200 3000
25969126 XuYipei E March 31, 2017, 6:17 a.m. OK GNU C++ TESTS 104 686 38502400 3000
25832706 vjudge1 E March 27, 2017, 6:37 a.m. OK GNU C++ TESTS 104 717 26521600 3000
27877921 xzyxzy E June 18, 2017, 6:24 a.m. OK GNU C++ TESTS 104 764 73932800 3000
25831296 vjudge2 E March 27, 2017, 4:28 a.m. OK GNU C++ TESTS 104 811 53555200 3000
25669628 jasonvictoryan E March 20, 2017, 3:17 p.m. OK GNU C++ TESTS 104 811 71577600 3000
31812685 vjudge5 E Oct. 27, 2017, 4:42 p.m. OK GNU C++ TESTS 104 826 63692800 3000
25833014 vjudge2 E March 27, 2017, 6:58 a.m. OK GNU C++ TESTS 104 873 53555200 3000
25694782 krijgertje E March 21, 2017, 4:08 p.m. OK GNU C++11 TESTS 104 265 24985600 3000
25650479 hpfdf E March 19, 2017, 4:15 p.m. OK GNU C++11 TESTS 104 498 59596800 3000
28992348 ccdream E July 30, 2017, 2:04 p.m. OK GNU C++11 TESTS 104 546 23756800 3000
25871859 toster1287 E March 28, 2017, 11:28 a.m. OK GNU C++11 TESTS 104 686 26419200 3000
25871805 wtw E March 28, 2017, 11:25 a.m. OK GNU C++11 TESTS 104 701 26521600 3000
67518486 mlby E Dec. 24, 2019, 11:39 a.m. OK GNU C++11 TESTS 104 702 63692800 3000
26819826 blutrex E May 3, 2017, 1:40 p.m. OK GNU C++11 TESTS 104 717 26419200 3000
25622361 LHiC V--o_o--V E March 18, 2017, 5:16 p.m. OK GNU C++11 TESTS 104 780 88678400 3000
31435950 ddfsb E Oct. 17, 2017, 1:28 a.m. OK GNU C++11 TESTS 104 794 83353600 3000
25689016 v.haralampiev E March 21, 2017, 1:09 p.m. OK GNU C++11 TESTS 104 795 50278400 3000
26675704 fqw E April 26, 2017, 4:26 a.m. OK GNU C++14 TESTS 104 607 24985600 3000
25728011 swust_20131737 E March 23, 2017, 7:37 a.m. OK GNU C++14 TESTS 104 763 81510400 3000
25681606 apiadu E March 21, 2017, 6:59 a.m. OK GNU C++14 TESTS 104 795 26521600 3000
25817580 Anusing1337 E March 26, 2017, 11:30 a.m. OK GNU C++14 TESTS 104 795 164249600 3000
40462603 weakup E July 17, 2018, 4:59 a.m. OK GNU C++14 TESTS 104 811 73523200 3000
35655714 a.j.decoder E Feb. 24, 2018, 5:43 p.m. OK GNU C++14 TESTS 104 842 65024000 3000
57180229 emoairx E July 17, 2019, 6:59 a.m. OK GNU C++14 TESTS 104 873 46899200 3000
48718149 KATATONIA E Jan. 22, 2019, 12:19 p.m. OK GNU C++14 TESTS 104 919 106598400 3000
25660833 Philipsweng E March 20, 2017, 7:22 a.m. OK GNU C++14 TESTS 104 935 173056000 3000
29844535 please_delete_account E Aug. 28, 2017, 11:52 a.m. OK GNU C++14 TESTS 104 950 70451200 3000
53427927 hjk1030 E April 27, 2019, 2:38 p.m. OK GNU C++17 TESTS 104 623 47411200 3000
58331421 vjudge4 E Aug. 5, 2019, 9:32 a.m. OK GNU C++17 TESTS 104 764 100454400 3000
58331221 vjudge2 E Aug. 5, 2019, 9:27 a.m. OK GNU C++17 TESTS 104 811 100454400 3000
48719667 Hamzqq9 E Jan. 22, 2019, 12:58 p.m. OK GNU C++17 TESTS 104 826 33177600 3000
48719788 Hamzqq9 E Jan. 22, 2019, 1:01 p.m. OK GNU C++17 TESTS 104 826 33382400 3000
44389989 tkj E Oct. 16, 2018, 8:02 a.m. OK GNU C++17 TESTS 104 826 56627200 3000
65918429 abc473848880 E Nov. 28, 2019, 3:28 p.m. OK GNU C++17 TESTS 104 857 40448000 3000
51163794 vjudge5 E March 11, 2019, 1:31 p.m. OK GNU C++17 TESTS 104 1076 59494400 3000
48172053 The_sound_of_the_fox E Jan. 10, 2019, 7:20 a.m. OK GNU C++17 TESTS 104 1918 65024000 3000
25813363 xDister E March 26, 2017, 7:44 a.m. OK Java 8 TESTS 104 2542 133427200 3000

remove filters

Back to search problems