Codeforces Round 213 (Div. 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
364 Codeforces Round 213 (Div. 1) FINISHED False 7500 391616985 Nov. 19, 2013, 3:30 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 627 ) E Empty Rectangles PROGRAMMING divide and conquer two pointers 3000

You 've got an n × m table (n rows and m columns), each cell of the table contains a "0" or a "1". Your task is to calculate the number of rectangles with the sides that are parallel to the sides of the table and go along the cell borders, such that the number one occurs exactly k times in the rectangle. The first line contains three space-separated integers n, m and k (1 ≤ n, m ≤ 2500, 0 ≤ k ≤ 6) -- the sizes of the table and the required number of numbers one. Next n lines each contains m characters "0" or "1". The i-th character of the j-th line corresponds to the character that is in the j-th row and the i-th column of the table. Print a single number -- the number of rectangles that contain exactly k numbers one. Please, do not write the %lld specifier to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specifier.

Tutorials

Codeforces Round #213 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5523717 crx E Dec. 26, 2013, 8:54 a.m. OK GNU C++ TESTS 76 2449 9318400 3000
7571297 apia E Aug. 25, 2014, 8:01 a.m. OK GNU C++ TESTS 76 2605 25497600 3000
26343356 encrypted E April 13, 2017, 4:03 p.m. OK GNU C++ TESTS 76 2620 92672000 3000
21312280 Talon_F E Oct. 9, 2016, 7:40 a.m. OK GNU C++ TESTS 76 2776 102502400 3000
21312330 Talon_F E Oct. 9, 2016, 7:43 a.m. OK GNU C++ TESTS 76 2870 102502400 3000
5286317 xyz111 E Nov. 28, 2013, 12:23 p.m. OK GNU C++ TESTS 76 2948 25395200 3000
5523781 fsy E Dec. 26, 2013, 9:03 a.m. OK GNU C++ TESTS 76 3354 50688000 3000
6956578 lsmll E June 25, 2014, 7:57 a.m. OK GNU C++ TESTS 76 3805 144691200 3000
5782985 Solitary E Jan. 24, 2014, 6:47 a.m. OK GNU C++ TESTS 76 3961 6553600 3000
5193772 bool_kzf E Nov. 22, 2013, 5:38 p.m. OK GNU C++ TESTS 76 3978 301772800 3000
5188706 Zuza E Nov. 22, 2013, 2:12 a.m. OK GNU C++0x TESTS 76 4695 13107200 3000
5261854 mruxim E Nov. 26, 2013, 8:36 p.m. OK GNU C++0x TESTS 76 5491 33894400 3000
8025182 soda_beta E Sept. 29, 2014, 12:57 p.m. OK GNU C++0x TESTS 76 5833 125747200 3000
5820388 ssmike E Jan. 27, 2014, 3:48 p.m. OK GNU C++0x TESTS 76 8080 28364800 3000
6361749 niklasb E April 15, 2014, 2:31 a.m. OK GNU C++0x TESTS 76 8236 72806400 3000
6271068 ikatanic E April 6, 2014, 2:01 p.m. OK GNU C++0x TESTS 76 9811 50483200 3000
5163885 KADR E Nov. 19, 2013, 6:15 p.m. OK GNU C++0x TESTS 76 11996 404377600 3000
26325124 THOOR_001 E April 12, 2017, 7:55 p.m. OK GNU C++11 TESTS 76 2340 8908800 3000
26324773 THOOR_001 E April 12, 2017, 7:31 p.m. OK GNU C++11 TESTS 76 2340 8908800 3000
40989359 ReaLNero1 E July 30, 2018, 10:51 p.m. OK GNU C++11 TESTS 76 2433 6860800 3000
26324824 THOOR_001 E April 12, 2017, 7:35 p.m. OK GNU C++11 TESTS 76 2448 8601600 3000
16417024 savinov E Feb. 28, 2016, 8:57 p.m. OK GNU C++11 TESTS 76 2464 90726400 3000
26324798 THOOR_001 E April 12, 2017, 7:34 p.m. OK GNU C++11 TESTS 76 2479 8396800 3000
16417054 savinov E Feb. 28, 2016, 9 p.m. OK GNU C++11 TESTS 76 2495 90726400 3000
16416981 savinov E Feb. 28, 2016, 8:52 p.m. OK GNU C++11 TESTS 76 2557 18432000 3000
14711175 Quang E Dec. 9, 2015, 9:49 a.m. OK GNU C++11 TESTS 76 2620 19353600 3000
45711382 vjudge3 E Nov. 14, 2018, 2:19 p.m. OK GNU C++11 TESTS 76 2854 44544000 3000
26330584 THOOR_001 E April 13, 2017, 3:57 a.m. OK GNU C++14 TESTS 76 2371 8908800 3000
26330575 THOOR_001 E April 13, 2017, 3:56 a.m. OK GNU C++14 TESTS 76 2402 8396800 3000
26324473 THOOR_001 E April 12, 2017, 7:10 p.m. OK GNU C++14 TESTS 76 2448 92672000 3000
26330554 THOOR_001 E April 13, 2017, 3:51 a.m. OK GNU C++14 TESTS 76 2449 8396800 3000
25075912 jcvb E Feb. 27, 2017, 11:47 a.m. OK GNU C++14 TESTS 76 2808 91238400 3000
63562304 vjudge1 E Oct. 27, 2019, 2:37 p.m. OK GNU C++14 TESTS 76 4212 25088000 3000
54221459 UncleGrandpa E May 16, 2019, 3:37 a.m. OK GNU C++14 TESTS 76 4477 13107200 3000
20567014 Ketsui E Sept. 13, 2016, 12:25 p.m. OK GNU C++14 TESTS 76 5538 410316800 3000
36944043 Acheing E April 4, 2018, 8:45 a.m. OK GNU C++14 TESTS 76 5694 53964800 3000
63558106 vjudge3 E Oct. 27, 2019, 1:27 p.m. OK GNU C++14 TESTS 76 5740 25190400 3000
51433360 yhchang3 E March 18, 2019, 3:46 a.m. OK GNU C++17 TESTS 76 3853 31334400 3000
57793401 pkgunboat E July 26, 2019, 10:27 a.m. OK GNU C++17 TESTS 76 4086 31539200 3000
59115492 jyf111 E Aug. 20, 2019, 1:18 a.m. OK GNU C++17 TESTS 76 4133 31436800 3000
55963060 ruo E June 23, 2019, 10:34 a.m. OK GNU C++17 TESTS 76 4258 25190400 3000
56991621 vjudge3 E July 13, 2019, 6:38 p.m. OK GNU C++17 TESTS 76 4414 33894400 3000
41825833 des1997 E Aug. 19, 2018, 11:59 a.m. OK GNU C++17 TESTS 76 5100 26214400 3000
36457228 Denisson E March 21, 2018, 2:52 p.m. OK GNU C++17 TESTS 76 7347 35020800 3000
6255459 blueseen E April 4, 2014, 3:48 a.m. OK MS C++ TESTS 76 4851 56422400 3000
61550878 tyf0530 E Sept. 30, 2019, 12:24 p.m. OK MS C++ 2017 TESTS 76 4492 31641600 3000

remove filters

Back to search problems