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 |
---|---|---|---|---|---|---|
1044 | Lyft Level 5 Challenge 2018 - Final Round | FINISHED | False | 7200 | 190468199 | Nov. 4, 2018, 6:10 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1353 ) | C | Optimal Polygon Perimeter | PROGRAMMING | dp geometry | 2200 |
B"You are given n points on the plane. The polygon formed from all the n points is strictly convex, that is, the polygon is convex, and there are no three collinear points (i.e. lying in the same straight line). The points are numbered from 1 to n , in clockwise order. We define the distance between two points p_1 = (x_1, y_1) and p_2 = (x_2, y_2) as their Manhattan distance: d(p_1, p_2) = |x_1 - x_2| + |y_1 - y_2|. Furthermore, we define the perimeter of a polygon, as the sum of Manhattan distances between all adjacent pairs of points on it; if the points on the polygon are ordered as p_1, p_2, ldots, p_k (k geq 3) , then the perimeter of the polygon is d(p_1, p_2) + d(p_2, p_3) + ldots + d(p_k, p_1) . For some parameter k , let's consider all the polygons that can be formed from the given set of points, having any k vertices, such that the polygon is not self-intersecting. For each such polygon, let's consider its perimeter. Over all such perimeters, we define f(k) to be the maximal perimeter. Please note, when checking whether a polygon is self-intersecting, that the edges of a polygon are still drawn as straight lines. For instance, in the following pictures: In the middle polygon, the order of points ( p_1, p_3, p_2, p_4 ) is not valid, since it is a self-intersecting polygon. The right polygon (whose edges resemble the Manhattan distance) has the same order and is not self-intersecting, but we consider edges as straight lines. The correct way to draw this polygon is ( p_1, p_2, p_3, p_4 ), which is the left polygon. Your task is to compute f(3), f(4), ldots, f(n) . In other words, find the maximum possible perimeter for each possible number of points (i.e. 3 to n ). The first line contains a single integer n ( 3 <= q n <= q 3 cdot 10^5 ) -- the number of points. Each of the next n lines contains two integers x_i and y_"... |
Lyft Level 5 Challenge 2018 — Final Round — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
46266500 | LJC00118 | C | Nov. 27, 2018, 3:31 a.m. | OK | GNU C++11 | TESTS | 56 | 78 | 2457600 | 2200 | |
52780244 | p_b_p_b | C | April 15, 2019, 1:56 p.m. | OK | GNU C++11 | TESTS | 56 | 109 | 4505600 | 2200 | |
52780212 | luogu_bot1 | C | April 15, 2019, 1:56 p.m. | OK | GNU C++11 | TESTS | 56 | 124 | 4505600 | 2200 | |
46428014 | memset0c | C | Dec. 1, 2018, 2:49 a.m. | OK | GNU C++11 | TESTS | 56 | 124 | 4812800 | 2200 | |
63221537 | Binary_Search_Tree | C | Oct. 23, 2019, 8:01 a.m. | OK | GNU C++11 | TESTS | 56 | 124 | 7987200 | 2200 | |
46266487 | Sooke | C | Nov. 27, 2018, 3:30 a.m. | OK | GNU C++11 | TESTS | 56 | 139 | 2457600 | 2200 | |
52275961 | _twilight | C | April 3, 2019, 2:48 p.m. | OK | GNU C++11 | TESTS | 56 | 186 | 2457600 | 2200 | |
46017840 | weng_233 | C | Nov. 21, 2018, 5:38 a.m. | OK | GNU C++11 | TESTS | 56 | 187 | 2252800 | 2200 | |
45294283 | RomaWhite | C | Nov. 4, 2018, 6:47 p.m. | OK | GNU C++11 | TESTS | 56 | 187 | 2457600 | 2200 | |
52529055 | hmfzy | C | April 9, 2019, 12:45 p.m. | OK | GNU C++11 | TESTS | 56 | 187 | 3686400 | 2200 | |
50062135 | Origenes | C | Feb. 17, 2019, 1:08 p.m. | OK | GNU C++14 | TESTS | 56 | 202 | 2560000 | 2200 | |
49161443 | XLor | C | Jan. 29, 2019, 3:29 p.m. | OK | GNU C++14 | TESTS | 56 | 202 | 7270400 | 2200 | |
47296544 | aj1729 | C | Dec. 20, 2018, 12:15 p.m. | OK | GNU C++14 | TESTS | 56 | 218 | 2355200 | 2200 | |
45309242 | neal | C | Nov. 5, 2018, 1:53 a.m. | OK | GNU C++14 | TESTS | 56 | 218 | 2355200 | 2200 | |
59929114 | IgoRamli | C | Sept. 3, 2019, 6:05 a.m. | OK | GNU C++14 | TESTS | 56 | 218 | 2457600 | 2200 | |
59888793 | vjudge3 | C | Sept. 2, 2019, 9:23 a.m. | OK | GNU C++14 | TESTS | 56 | 218 | 2457600 | 2200 | |
57009506 | vjudge5 | C | July 14, 2019, 8:29 a.m. | OK | GNU C++14 | TESTS | 56 | 218 | 2457600 | 2200 | |
45296137 | neal | C | Nov. 4, 2018, 7:03 p.m. | OK | GNU C++14 | TESTS | 56 | 218 | 3584000 | 2200 | |
45299007 | waterfall | C | Nov. 4, 2018, 7:32 p.m. | OK | GNU C++14 | TESTS | 56 | 218 | 4812800 | 2200 | |
45294337 | Fdg | C | Nov. 4, 2018, 6:48 p.m. | OK | GNU C++14 | TESTS | 56 | 218 | 6348800 | 2200 | |
55584083 | chongryong | C | June 15, 2019, 8:27 a.m. | OK | GNU C++17 | TESTS | 56 | 202 | 2457600 | 2200 | |
55230340 | gtx1080 | C | June 7, 2019, 5:11 a.m. | OK | GNU C++17 | TESTS | 56 | 202 | 2457600 | 2200 | |
62458576 | Chen_zsc | C | Oct. 13, 2019, 7:24 a.m. | OK | GNU C++17 | TESTS | 56 | 217 | 2457600 | 2200 | |
52951619 | yuxizi | C | April 18, 2019, 12:08 p.m. | OK | GNU C++17 | TESTS | 56 | 217 | 2457600 | 2200 | |
56822525 | vjudge4 | C | July 11, 2019, 1:52 a.m. | OK | GNU C++17 | TESTS | 56 | 218 | 2457600 | 2200 | |
56822498 | yangzijun | C | July 11, 2019, 1:50 a.m. | OK | GNU C++17 | TESTS | 56 | 218 | 2457600 | 2200 | |
55554725 | chongryong | C | June 14, 2019, 9:16 a.m. | OK | GNU C++17 | TESTS | 56 | 218 | 2457600 | 2200 | |
45291111 | Errichto | C | Nov. 4, 2018, 6:25 p.m. | OK | GNU C++17 | TESTS | 56 | 218 | 2662400 | 2200 | |
62554889 | Derzeed | C | Oct. 14, 2019, 10:10 a.m. | OK | GNU C++17 | TESTS | 56 | 249 | 2355200 | 2200 | |
60072711 | Phortox | C | Sept. 5, 2019, 11:39 a.m. | OK | GNU C++17 | TESTS | 56 | 249 | 2457600 | 2200 | |
45296013 | ilyakor | C | Nov. 4, 2018, 7:02 p.m. | OK | Java 8 | TESTS | 56 | 265 | 0 | 2200 | |
45291850 | Petr | C | Nov. 4, 2018, 6:29 p.m. | OK | Java 8 | TESTS | 56 | 296 | 0 | 2200 | |
45291840 | qwerty787788 | C | Nov. 4, 2018, 6:29 p.m. | OK | Java 8 | TESTS | 56 | 311 | 0 | 2200 | |
53303247 | BessieTheCow | C | April 25, 2019, 11:11 p.m. | OK | MS C++ 2017 | TESTS | 56 | 701 | 2457600 | 2200 | |
45407487 | Mulx10 | C | Nov. 7, 2018, 10:21 a.m. | OK | Python 2 | TESTS | 56 | 1715 | 23449600 | 2200 |
Back to search problems