MemSQL start[c]up 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
325 MemSQL start[c]up Round 1 FINISHED False 7200 402757185 July 13, 2013, 5 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 576 ) D Reclamation PROGRAMMING dsu 2800

In a far away land, there exists a planet shaped like a cylinder. There are three regions in this planet: top, bottom, and side as shown in the following picture. Both the top and the bottom areas consist of big cities. The side area consists entirely of the sea. One day, a city decides that it has too little space and would like to reclamate some of the side area into land. The side area can be represented by a grid with r rows and c columns — each cell represents a rectangular area in the side area. The rows are numbered 1 through r from top to bottom, while the columns are numbered 1 through c from left to right. Two cells are adjacent if they share a side. In addition, two cells located on the same row — one in the leftmost column, and the other in the rightmost column — are also adjacent. Initially, all of the cells are occupied by the sea. The plan is to turn some of those cells into land one by one in a particular order that will be given to you. However, the sea on the side area is also used as a major trade route. More formally, it is not allowed to reclamate the sea cells into land in such way that there does not exist a sequence of cells with the following property: All cells in the sequence are occupied by the sea (i.e., they are not reclamated). The first cell in the sequence is in the top row. The last cell in the sequence is in the bottom row. Consecutive cells in the sequence are adjacent. Thus, the plan is revised. Each time a cell is going to be turned from sea to land, the city first needs to check whether or not it would violate the above condition by doing that. If it would, then the cell is not turned into land and the plan proceeds into the next cell. Otherwise, the cell is turned into land. Your job is to simulate this and output the number of cells that were successfully turned into land. The first line consists of three integers r , c , and n ( 1 ≤ r , c ≤ 3000 , 1 ≤ n ≤ 3·10 5 ). Then, n lines follow, describing the cells in the

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
11255212 jiangyx D May 24, 2015, 2:07 p.m. OK FPC TESTS 93 560 77004800 2800
4075540 PeterTong97 D July 15, 2013, 1:01 p.m. OK FPC TESTS 93 625 183500800 2800
8770954 SHUXK D Nov. 21, 2014, 5:14 a.m. OK FPC TESTS 93 686 91136000 2800
4070544 Nik_Storm_2010 D July 14, 2013, 4:54 p.m. OK FPC TESTS 93 875 449433600 2800
4071138 ZeRoGerc D July 14, 2013, 8:06 p.m. OK FPC TESTS 93 2281 513433600 2800
4071131 ZeRoGerc D July 14, 2013, 8:04 p.m. OK FPC TESTS 93 2355 513433600 2800
8977088 Stilwell D Dec. 4, 2014, 5:29 a.m. OK GNU C++ TESTS 93 374 172544000 2800
4063613 Dmitry_Egorov D July 13, 2013, 6:13 p.m. OK GNU C++ TESTS 93 375 83558400 2800
8281210 beantan1 D Oct. 17, 2014, 12:36 p.m. OK GNU C++ TESTS 93 404 79052800 2800
11752068 humanfy D June 24, 2015, 9:07 p.m. OK GNU C++ TESTS 93 434 77414400 2800
8032311 jason_yu D Sept. 30, 2014, 5:31 a.m. OK GNU C++ TESTS 93 434 162406400 2800
8066510 hockey_for_NOI D Oct. 3, 2014, 8:44 a.m. OK GNU C++ TESTS 93 436 38707200 2800
19419996 liuyiluxun D July 26, 2016, 9:51 a.m. OK GNU C++ TESTS 93 436 77209600 2800
8843631 vfleaking D Nov. 25, 2014, 8:41 a.m. OK GNU C++ TESTS 93 466 81203200 2800
12316213 AcrossTheSky D Aug. 2, 2015, 3:02 p.m. OK GNU C++ TESTS 93 466 90828800 2800
12316014 AcrossTheSky D Aug. 2, 2015, 2:42 p.m. OK GNU C++ TESTS 93 466 90828800 2800
4077481 lovro D July 15, 2013, 11:39 p.m. OK GNU C++0x TESTS 93 343 77004800 2800
6857385 ftiasch D June 10, 2014, 5:40 a.m. OK GNU C++0x TESTS 93 654 162304000 2800
8495667 zshi D Oct. 31, 2014, 9:41 a.m. OK GNU C++0x TESTS 93 716 378982400 2800
4075197 lastenX D July 15, 2013, 12:14 p.m. OK GNU C++0x TESTS 93 733 90624000 2800
9478274 ikatanic D Jan. 19, 2015, 4:58 p.m. OK GNU C++0x TESTS 93 746 91955200 2800
8511495 zshi D Nov. 1, 2014, 12:13 p.m. OK GNU C++0x TESTS 93 746 378982400 2800
8875119 equation314 D Nov. 28, 2014, 2:06 a.m. OK GNU C++0x TESTS 93 748 81817600 2800
9468699 stjepan D Jan. 18, 2015, 11:46 p.m. OK GNU C++0x TESTS 93 778 90828800 2800
10100317 -XraY- D March 1, 2015, 7:12 p.m. OK GNU C++0x TESTS 93 778 217907200 2800
6993855 maciejk D July 1, 2014, 8:17 p.m. OK GNU C++0x TESTS 93 810 189747200 2800
68657619 Hazyknight D Jan. 12, 2020, 12:41 p.m. OK GNU C++11 TESTS 93 342 39833600 2800
69006520 Social_Zhao D Jan. 18, 2020, 12:01 a.m. OK GNU C++11 TESTS 93 342 98201600 2800
63295703 zhouzhuan D Oct. 24, 2019, 12:55 p.m. OK GNU C++11 TESTS 93 342 148582400 2800
11456016 FizzyDavid D June 6, 2015, 8:18 a.m. OK GNU C++11 TESTS 93 374 90316800 2800
68934140 clever_sheep D Jan. 16, 2020, 12:16 p.m. OK GNU C++11 TESTS 93 404 144588800 2800
12636022 zpltys D Aug. 22, 2015, 3:33 a.m. OK GNU C++11 TESTS 93 434 90828800 2800
11335039 zld3794955 D May 28, 2015, 3:23 p.m. OK GNU C++11 TESTS 93 434 90828800 2800
39969744 yasugongshang D July 5, 2018, 1:08 a.m. OK GNU C++11 TESTS 93 434 147046400 2800
68935636 fa_555 D Jan. 16, 2020, 12:44 p.m. OK GNU C++11 TESTS 93 436 147456000 2800
22692576 QAQQQ D Dec. 4, 2016, 9:21 a.m. OK GNU C++11 TESTS 93 466 100249600 2800
45871477 Darius0021 D Nov. 17, 2018, 10:14 a.m. OK GNU C++14 TESTS 93 436 83353600 2800
27550153 vjudge1 D June 3, 2017, 6:16 p.m. OK GNU C++14 TESTS 93 498 184422400 2800
27550117 cxaphoenix D June 3, 2017, 6:14 p.m. OK GNU C++14 TESTS 93 498 184422400 2800
24034934 vjudge3 D Jan. 22, 2017, 5:22 p.m. OK GNU C++14 TESTS 93 592 164352000 2800
27713735 zlc1114 D June 11, 2017, 2:36 a.m. OK GNU C++14 TESTS 93 592 289894400 2800
69262758 OceanEye_fdc D Jan. 21, 2020, 5:35 p.m. OK GNU C++14 TESTS 93 652 98304000 2800
69262087 OceanEye_fdc D Jan. 21, 2020, 5:22 p.m. OK GNU C++14 TESTS 93 652 98304000 2800
45890431 JustasZ D Nov. 17, 2018, 6:20 p.m. OK GNU C++14 TESTS 93 654 78233600 2800
69260531 OceanEye_fdc D Jan. 21, 2020, 4:55 p.m. OK GNU C++14 TESTS 93 654 98508800 2800
27533214 chielo D June 3, 2017, 12:31 a.m. OK GNU C++14 TESTS 93 654 216883200 2800
56967612 hjk1030 D July 13, 2019, 8:54 a.m. OK GNU C++17 TESTS 93 716 90214400 2800
38152789 rushcheyo D May 13, 2018, 5:33 a.m. OK GNU C++17 TESTS 93 716 166195200 2800
42826249 FangHao D Sept. 13, 2018, 10:21 a.m. OK GNU C++17 TESTS 93 778 181760000 2800
42826292 luogu_bot1 D Sept. 13, 2018, 10:23 a.m. OK GNU C++17 TESTS 93 840 164659200 2800
42826269 FangHao D Sept. 13, 2018, 10:22 a.m. OK GNU C++17 TESTS 93 840 164659200 2800
52530810 ivan100sic D April 9, 2019, 1:24 p.m. OK GNU C++17 TESTS 93 936 289280000 2800
53771017 ruo D May 5, 2019, 5:14 a.m. OK GNU C++17 TESTS 93 1278 95129600 2800
58140972 Benq D Aug. 1, 2019, 6:08 p.m. OK GNU C++17 TESTS 93 3836 54067200 2800
4122409 uwi D July 20, 2013, 4:58 p.m. OK Java 6 TESTS 93 562 137420800 2800
4065621 Petr D July 13, 2013, 9:50 p.m. OK Java 7 TESTS 93 562 72499200 2800
4087480 sweiss D July 17, 2013, 2:57 p.m. OK Java 7 TESTS 93 811 101683200 2800
4130659 PolarNick D July 21, 2013, 5:46 p.m. OK Java 7 TESTS 93 1546 147558400 2800
4144437 izban D July 24, 2013, 4:02 a.m. OK Java 7 TESTS 93 2828 362905600 2800
11358795 absi2011 D May 30, 2015, 4:19 p.m. OK MS C++ TESTS 93 466 79564800 2800
7345941 gxnncrx1993 D Aug. 4, 2014, 2:50 p.m. OK MS C++ TESTS 93 624 80179200 2800
15142240 HappyNewYearMike D Dec. 31, 2015, 10:13 p.m. OK MS C++ TESTS 93 684 90521600 2800
4259667 lzsb D Aug. 10, 2013, 4:56 a.m. OK MS C++ TESTS 93 686 90316800 2800
4069242 stgatilov D July 14, 2013, 11:17 a.m. OK MS C++ TESTS 93 1421 99532800 2800
7352526 tzzcl D Aug. 5, 2014, 12:36 p.m. OK MS C++ TESTS 93 3430 290201600 2800
7347694 gxnncrx1993 D Aug. 4, 2014, 8:37 p.m. OK MS C++ TESTS 93 4554 155750400 2800

remove filters

Back to search problems