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 |
|---|---|---|---|---|---|---|
| 335 | MemSQL start[c]up Round 2 - online version | FINISHED | False | 10800 | 400856423 | Aug. 3, 2013, 5 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 241 ) | E | Counting Skyscrapers | PROGRAMMING | dp math probabilities | 2900 |
A number of skyscrapers have been built in a line. The number of skyscrapers was chosen uniformly at random between 2 and 314! (314 factorial, a very large number). The height of each skyscraper was chosen randomly and independently, with height i having probability 2 - i for all positive integers i . The floors of a skyscraper with height i are numbered 0 through i - 1 . To speed up transit times, a number of zip lines were installed between skyscrapers. Specifically, there is a zip line connecting the i -th floor of one skyscraper with the i -th floor of another skyscraper if and only if there are no skyscrapers between them that have an i -th floor. Alice and Bob decide to count the number of skyscrapers. Alice is thorough, and wants to know exactly how many skyscrapers there are. She begins at the leftmost skyscraper, with a counter at 1. She then moves to the right, one skyscraper at a time, adding 1 to her counter each time she moves. She continues until she reaches the rightmost skyscraper. Bob is impatient, and wants to finish as fast as possible. He begins at the leftmost skyscraper, with a counter at 1. He moves from building to building using zip lines. At each stage Bob uses the highest available zip line to the right, but ignores floors with a height greater than h due to fear of heights. When Bob uses a zip line, he travels too fast to count how many skyscrapers he passed. Instead, he just adds 2 i to his counter, where i is the number of the floor he's currently on. He continues until he reaches the rightmost skyscraper. Consider the following example. There are 6 buildings, with heights 1 , 4 , 3 , 4 , 1 , 2 from left to right, and h = 2 . Alice begins with her counter at 1 and then adds 1 five times for a result of 6 . Bob begins with his counter at 1 , then he adds 1 , 4 , 4 , and 2 , in order, for a result of 12 . Note that Bob ignores the highest zip line because of his fear of heights ( h = 2 ). Bob's counter is at the top of the image |
| MemSQL start[c]up Round 2 -- Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 11135474 | louisja1 | E | May 18, 2015, 1:31 p.m. | OK | FPC | TESTS | 28 | 92 | 0 | 2900 | |
| 11135293 | yubaby | E | May 18, 2015, 1:17 p.m. | OK | FPC | TESTS | 28 | 124 | 15462400 | 2900 | |
| 29767810 | progg_admin | E | Aug. 25, 2017, 4:23 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 27624214 | hzhzhao | E | June 7, 2017, 2:50 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 14050565 | 130705009 | E | Nov. 4, 2015, 2:29 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 11134565 | Philipsweng | E | May 18, 2015, 12:14 p.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 11128369 | songsymbol | E | May 17, 2015, 4:25 p.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 10453683 | wmdcstdio | E | March 26, 2015, 3:12 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 8475472 | keavil | E | Oct. 30, 2014, 3:07 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 8396726 | jiry_2 | E | Oct. 25, 2014, 1:21 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 8347763 | duzfan | E | Oct. 22, 2014, 3:25 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 8325153 | ydc | E | Oct. 20, 2014, 1:46 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 0 | 2900 | |
| 9484864 | stjepan | E | Jan. 20, 2015, 1:30 p.m. | OK | GNU C++0x | TESTS | 28 | 218 | 0 | 2900 | |
| 11397698 | zld3794955 | E | June 3, 2015, 6:36 a.m. | OK | GNU C++11 | TESTS | 28 | 30 | 0 | 2900 | |
| 10594626 | -XraY- | E | April 4, 2015, 8:46 p.m. | OK | GNU C++11 | TESTS | 28 | 30 | 0 | 2900 | |
| 32779340 | wfj_2048 | E | Nov. 29, 2017, 11:44 a.m. | OK | GNU C++11 | TESTS | 28 | 30 | 2048000 | 2900 | |
| 26467322 | vjudge1 | E | April 18, 2017, 2:42 a.m. | OK | GNU C++11 | TESTS | 28 | 30 | 2048000 | 2900 | |
| 16916614 | jkxing | E | March 25, 2016, 6:23 a.m. | OK | GNU C++11 | TESTS | 28 | 30 | 2252800 | 2900 | |
| 46700258 | tianyi_luo | E | Dec. 7, 2018, 1:05 a.m. | OK | GNU C++11 | TESTS | 28 | 60 | 0 | 2900 | |
| 60908010 | luogu_bot5 | E | Sept. 20, 2019, 3:57 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 0 | 2900 | |
| 27751566 | jiazihankk | E | June 13, 2017, 8:19 a.m. | OK | GNU C++11 | TESTS | 28 | 62 | 0 | 2900 | |
| 62087094 | forever_dreams | E | Oct. 8, 2019, 3 a.m. | OK | GNU C++11 | TESTS | 28 | 92 | 0 | 2900 | |
| 62049190 | Backseat-Stargazer | E | Oct. 7, 2019, 8:55 a.m. | OK | GNU C++11 | TESTS | 28 | 92 | 0 | 2900 | |
| 31671630 | apiadu | E | Oct. 24, 2017, 7:06 a.m. | OK | GNU C++14 | TESTS | 28 | 30 | 1945600 | 2900 | |
| 28863260 | DCXDCX | E | July 25, 2017, 2:47 a.m. | OK | GNU C++14 | TESTS | 28 | 30 | 1945600 | 2900 | |
| 23661284 | Ali.Pi | E | Jan. 9, 2017, 7 a.m. | OK | GNU C++14 | TESTS | 28 | 30 | 1945600 | 2900 | |
| 62086295 | idxcalcal | E | Oct. 8, 2019, 2:15 a.m. | OK | GNU C++14 | TESTS | 28 | 60 | 307200 | 2900 | |
| 56831710 | zhangyuxi | E | July 11, 2019, 7:18 a.m. | OK | GNU C++14 | TESTS | 28 | 92 | 12697600 | 2900 | |
| 36387877 | iqqsoszs | E | March 18, 2018, 12:11 p.m. | OK | GNU C++14 | TESTS | 28 | 156 | 3379200 | 2900 | |
| 59431831 | vjudge5 | E | Aug. 25, 2019, 6:42 a.m. | OK | GNU C++14 | TESTS | 28 | 496 | 49561600 | 2900 | |
| 49189536 | black_horse2014 | E | Jan. 30, 2019, 7:37 a.m. | OK | GNU C++14 | TESTS | 28 | 622 | 34918400 | 2900 | |
| 54403835 | ruo | E | May 20, 2019, 4:12 a.m. | OK | GNU C++17 | TESTS | 28 | 30 | 0 | 2900 | |
| 57354887 | hjk1030 | E | July 20, 2019, 5:48 a.m. | OK | GNU C++17 | TESTS | 28 | 62 | 0 | 2900 | |
| 50707427 | vjudge1 | E | March 3, 2019, 5:04 a.m. | OK | GNU C++17 | TESTS | 28 | 156 | 512000 | 2900 | |
| 38192939 | rushcheyo | E | May 13, 2018, 2:01 p.m. | OK | GNU C++17 | TESTS | 28 | 280 | 3379200 | 2900 | |
| 59431861 | Anachor | E | Aug. 25, 2019, 6:43 a.m. | OK | GNU C++17 | TESTS | 28 | 528 | 49561600 | 2900 | |
| 4224802 | Egor | E | Aug. 3, 2013, 9:21 p.m. | OK | Java 7 | TESTS | 28 | 312 | 51814400 | 2900 | |
| 4280407 | 37ae912 | E | Aug. 15, 2013, 5:25 a.m. | OK | Python 2 | TESTS | 28 | 1466 | 0 | 2900 |
Back to search problems