Lyft Level 5 Challenge 2018 - Elimination Round

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
1033 Lyft Level 5 Challenge 2018 - Elimination Round FINISHED False 7200 198593724 Oct. 7, 2018, 5:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5664 ) C Permutation Game PROGRAMMING brute force dp games 1600

B'After a long day, Alice and Bob decided to play a little game. The game board consists of n cells in a straight line, numbered from 1 to n , where each cell contains a number a_i between 1 and n . Furthermore, no two cells contain the same number. A token is placed in one of the cells. They take alternating turns of moving the token around the board, with Alice moving first. The current player can move from cell i to cell j only if the following two conditions are satisfied: Whoever is unable to make a move, loses. For each possible starting position, determine who wins if they both play optimally. It can be shown that the game is always finite, i.e. there always is a winning strategy for one of the players. The first line contains a single integer n ( 1 <= n <= 10^5 ) -- the number of numbers. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ). Furthermore, there are no pair of indices i neq j such that a_i = a_j . Print s -- a string of n characters, where the i -th character represents the outcome of the game if the token is initially placed in the cell i . If Alice wins, then s_i has to be equal to "A"; otherwise, s_i has to be equal to "B". In the first sample, if Bob puts the token on the number (not position): '...

Tutorials

The Lyft Level 5 Challenge 2018 Elimination Round (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
44752272 N1ukash C Oct. 23, 2018, 8:44 p.m. OK Clang++17 Diagnostics TESTS 45 483 15872000 1600
44117138 cpy C Oct. 11, 2018, 2:48 p.m. OK D TESTS 45 77 4300800 1600
43964162 Ulanov_Victor C Oct. 7, 2018, 6:02 p.m. OK FPC TESTS 45 46 1536000 1600
43970849 ruban C Oct. 7, 2018, 6:59 p.m. OK FPC TESTS 45 311 76800000 1600
43984593 libra9z C Oct. 8, 2018, 6:13 a.m. OK GNU C11 TESTS 45 46 1638400 1600
55956650 dpritam C June 23, 2019, 7:25 a.m. OK GNU C11 TESTS 45 327 1228800 1600
43967915 vanda C Oct. 7, 2018, 6:33 p.m. OK GNU C11 TESTS 45 483 819200 1600
48704088 vjudge5 C Jan. 22, 2019, 4:57 a.m. OK GNU C++11 TESTS 45 31 819200 1600
44727548 prayerhgq C Oct. 23, 2018, 8:45 a.m. OK GNU C++11 TESTS 45 31 1228800 1600
44037823 rayhaha C Oct. 9, 2018, 1:34 p.m. OK GNU C++11 TESTS 45 31 1228800 1600
43958606 AnzheWang C Oct. 7, 2018, 5:31 p.m. OK GNU C++11 TESTS 45 31 1228800 1600
44751719 ReaLNero1 C Oct. 23, 2018, 8:19 p.m. OK GNU C++11 TESTS 45 31 1228800 1600
46200995 Vixbob C Nov. 25, 2018, 11:22 a.m. OK GNU C++11 TESTS 45 31 1228800 1600
46755432 mtmohim C Dec. 8, 2018, 11:27 a.m. OK GNU C++11 TESTS 45 31 1228800 1600
51972462 dhruv1998 C March 29, 2019, 1:01 p.m. OK GNU C++11 TESTS 45 31 1433600 1600
43969904 tomaso C Oct. 7, 2018, 6:50 p.m. OK GNU C++11 TESTS 45 46 409600 1600
65359748 _ShadowSong C Nov. 19, 2019, 2:56 p.m. OK GNU C++11 TESTS 45 46 512000 1600
43959789 wleung_bvg C Oct. 7, 2018, 5:36 p.m. OK GNU C++14 TESTS 45 31 921600 1600
44106680 remoon C Oct. 11, 2018, 9:38 a.m. OK GNU C++14 TESTS 45 31 1945600 1600
44904173 animeFORever C Oct. 26, 2018, 10:37 a.m. OK GNU C++14 TESTS 45 46 512000 1600
43962816 sievra C Oct. 7, 2018, 5:53 p.m. OK GNU C++14 TESTS 45 46 512000 1600
45109359 notanymore C Oct. 30, 2018, 5:42 p.m. OK GNU C++14 TESTS 45 46 512000 1600
54216243 zunaedsifat C May 15, 2019, 9:46 p.m. OK GNU C++14 TESTS 45 46 512000 1600
44578255 VLADO C Oct. 20, 2018, 7:43 a.m. OK GNU C++14 TESTS 45 46 819200 1600
49107794 sqdbibibi C Jan. 28, 2019, 1:48 p.m. OK GNU C++14 TESTS 45 46 819200 1600
45111007 introverted C Oct. 30, 2018, 6:31 p.m. OK GNU C++14 TESTS 45 46 819200 1600
44080382 jaiswal_abhi C Oct. 10, 2018, 2:48 p.m. OK GNU C++14 TESTS 45 46 819200 1600
43957633 LiChenKoh C Oct. 7, 2018, 5:27 p.m. OK GNU C++17 TESTS 45 31 1024000 1600
43960641 Doriath C Oct. 7, 2018, 5:40 p.m. OK GNU C++17 TESTS 45 46 512000 1600
43961629 eisen_shinzou C Oct. 7, 2018, 5:45 p.m. OK GNU C++17 TESTS 45 46 614400 1600
44383850 vjudge4 C Oct. 16, 2018, 4:56 a.m. OK GNU C++17 TESTS 45 46 716800 1600
43978488 poikniok C Oct. 7, 2018, 11:35 p.m. OK GNU C++17 TESTS 45 46 819200 1600
43975426 kaminator C Oct. 7, 2018, 8:47 p.m. OK GNU C++17 TESTS 45 46 819200 1600
60320525 9taufeeque9 C Sept. 9, 2019, 8:13 p.m. OK GNU C++17 TESTS 45 46 819200 1600
54799102 TheFenrir C May 29, 2019, 11:08 a.m. OK GNU C++17 TESTS 45 46 819200 1600
46196706 pkgunboat C Nov. 25, 2018, 8:45 a.m. OK GNU C++17 TESTS 45 46 819200 1600
44894517 vjudge5 C Oct. 26, 2018, 5:53 a.m. OK GNU C++17 TESTS 45 46 819200 1600
43960807 Martynas C Oct. 7, 2018, 5:41 p.m. OK Go TESTS 45 78 716800 1600
45427887 Marii C Nov. 7, 2018, 11:26 p.m. OK Go TESTS 45 109 0 1600
68046936 ashanksingh1997 C Jan. 1, 2020, 4:53 p.m. OK Java 11 TESTS 45 311 0 1600
44615408 happybelly C Oct. 21, 2018, 12:43 a.m. OK Java 8 TESTS 45 139 0 1600
50654121 Akash_UR C March 1, 2019, 6:48 p.m. OK Java 8 TESTS 45 140 0 1600
54064491 Sasuke-u C May 13, 2019, 12:46 p.m. OK Java 8 TESTS 45 140 0 1600
46064769 Laboon C Nov. 22, 2018, 3:43 p.m. OK Java 8 TESTS 45 140 0 1600
45881441 hongquanntct C Nov. 17, 2018, 2:07 p.m. OK Java 8 TESTS 45 140 0 1600
44204478 alexander89116 C Oct. 12, 2018, 3:33 p.m. OK Java 8 TESTS 45 140 0 1600
43982799 SrapZark C Oct. 8, 2018, 4:34 a.m. OK Java 8 TESTS 45 140 0 1600
43961014 NMouad21 C Oct. 7, 2018, 5:42 p.m. OK Java 8 TESTS 45 140 0 1600
43959589 HardikDobariya C Oct. 7, 2018, 5:35 p.m. OK Java 8 TESTS 45 140 0 1600
43957081 AQT C Oct. 7, 2018, 5:25 p.m. OK Java 8 TESTS 45 140 0 1600
43970260 raynald C Oct. 7, 2018, 6:54 p.m. OK Kotlin TESTS 45 373 5017600 1600
43963156 Jarekczek C Oct. 7, 2018, 5:55 p.m. OK Kotlin TESTS 45 686 0 1600
44063351 eki C Oct. 10, 2018, 7:32 a.m. OK Mono C# TESTS 45 77 8499200 1600
43978111 omikad C Oct. 7, 2018, 11:02 p.m. OK Mono C# TESTS 45 93 11878400 1600
44402259 teru C Oct. 16, 2018, 1:21 p.m. OK Mono C# TESTS 45 93 12390400 1600
44169062 thetansquared C Oct. 12, 2018, 4:17 a.m. OK Mono C# TESTS 45 124 18636800 1600
43961469 kuuso C Oct. 7, 2018, 5:44 p.m. OK Mono C# TESTS 45 171 18636800 1600
43971151 vivek17geek C Oct. 7, 2018, 7:01 p.m. OK Mono C# TESTS 45 171 24883200 1600
43967125 Roverandom C Oct. 7, 2018, 6:26 p.m. OK Mono C# TESTS 45 358 12083200 1600
43958768 RAD C Oct. 7, 2018, 5:32 p.m. OK MS C++ TESTS 45 46 1331200 1600
43986284 math957963 C Oct. 8, 2018, 7:25 a.m. OK MS C++ TESTS 45 61 2150400 1600
43967689 abtest100 C Oct. 7, 2018, 6:31 p.m. OK MS C++ TESTS 45 61 2867200 1600
43966548 claus_spb C Oct. 7, 2018, 6:21 p.m. OK MS C++ TESTS 45 62 512000 1600
45767441 Houbunsha C Nov. 15, 2018, 12:52 p.m. OK MS C++ TESTS 45 62 1228800 1600
48708399 vjudge3 C Jan. 22, 2019, 7:10 a.m. OK MS C++ TESTS 45 62 1638400 1600
44489277 scorpiowf C Oct. 18, 2018, 1:50 p.m. OK MS C++ TESTS 45 62 26112000 1600
59199037 vjudge1 C Aug. 21, 2019, 3:27 a.m. OK MS C++ TESTS 45 77 1638400 1600
48707378 vjudge1 C Jan. 22, 2019, 6:39 a.m. OK MS C++ TESTS 45 77 2252800 1600
43955516 LoneFox C Oct. 7, 2018, 5:19 p.m. OK MS C++ TESTS 45 78 2457600 1600
63053222 YHHxBULIATANIA C Oct. 21, 2019, 4:24 a.m. OK MS C++ 2017 TESTS 45 46 921600 1600
68978117 AleksanderBalobanov C Jan. 17, 2020, 9:38 a.m. OK MS C++ 2017 TESTS 45 62 2764800 1600
57636367 pmitkov C July 24, 2019, 10:57 a.m. OK MS C++ 2017 TESTS 45 78 1638400 1600
44023198 kd710306 C Oct. 9, 2018, 6:06 a.m. OK PyPy 2 TESTS 45 202 7884800 1600
44006306 abhigyank C Oct. 8, 2018, 4:03 p.m. OK PyPy 2 TESTS 45 233 10956800 1600
44047760 eugalt C Oct. 9, 2018, 6:05 p.m. OK PyPy 2 TESTS 45 295 9420800 1600
44046911 eugalt C Oct. 9, 2018, 5:38 p.m. OK PyPy 2 TESTS 45 296 9216000 1600
44047029 eugalt C Oct. 9, 2018, 5:42 p.m. OK PyPy 2 TESTS 45 296 9523200 1600
69263040 vjudge4 C Jan. 21, 2020, 5:40 p.m. OK PyPy 2 TESTS 45 327 9216000 1600
69263089 YESMAths C Jan. 21, 2020, 5:41 p.m. OK PyPy 2 TESTS 45 343 9216000 1600
44039735 eugalt C Oct. 9, 2018, 2:15 p.m. OK PyPy 2 TESTS 45 373 8499200 1600
43966486 p4thet1c C Oct. 7, 2018, 6:20 p.m. OK PyPy 2 TESTS 45 374 18534400 1600
44039036 eugalt C Oct. 9, 2018, 2 p.m. OK PyPy 2 TESTS 45 390 8499200 1600
45332461 petiteteaparty C Nov. 5, 2018, 3:54 p.m. OK PyPy 3 TESTS 45 265 11980800 1600
43964205 PiscesDream C Oct. 7, 2018, 6:02 p.m. OK PyPy 3 TESTS 45 295 11776000 1600
43983900 apoorv1999 C Oct. 8, 2018, 5:37 a.m. OK PyPy 3 TESTS 45 373 12083200 1600
44008765 LordVader C Oct. 8, 2018, 5:13 p.m. OK PyPy 3 TESTS 45 374 11059200 1600
44016345 tranphuminhbkhn C Oct. 8, 2018, 9:29 p.m. OK PyPy 3 TESTS 45 389 13516800 1600
43967379 yan4ik C Oct. 7, 2018, 6:28 p.m. OK PyPy 3 TESTS 45 389 17305600 1600
56050707 Mr.Inconsistent C June 25, 2019, 6:54 p.m. OK PyPy 3 TESTS 45 390 15667200 1600
43966706 max_hha C Oct. 7, 2018, 6:22 p.m. OK PyPy 3 TESTS 45 405 11264000 1600
44005509 eugalt C Oct. 8, 2018, 3:42 p.m. OK PyPy 3 TESTS 45 405 11776000 1600
43965654 nadchu C Oct. 7, 2018, 6:13 p.m. OK PyPy 3 TESTS 45 405 12185600 1600
46198167 daminglu C Nov. 25, 2018, 9:37 a.m. OK Python 2 TESTS 45 420 8601600 1600
43964024 Onesh0t C Oct. 7, 2018, 6:01 p.m. OK Python 2 TESTS 45 467 7884800 1600
44000305 SerChirag C Oct. 8, 2018, 1:26 p.m. OK Python 2 TESTS 45 482 13516800 1600
43973510 Seikang C Oct. 7, 2018, 8:07 p.m. OK Python 2 TESTS 45 499 5427200 1600
43968976 wangkan2001 C Oct. 7, 2018, 6:42 p.m. OK Python 2 TESTS 45 857 12185600 1600
43967672 mars.leezm C Oct. 7, 2018, 6:30 p.m. OK Python 2 TESTS 45 920 33484800 1600
43982585 radhikapillai25 C Oct. 8, 2018, 4:21 a.m. OK Python 2 TESTS 45 997 29388800 1600
46990943 Praxis C Dec. 14, 2018, 4:06 a.m. OK Python 3 TESTS 45 373 7065600 1600
47845817 saku7 C Jan. 2, 2019, 2:37 p.m. OK Python 3 TESTS 45 421 6758400 1600
47845828 saku7 C Jan. 2, 2019, 2:37 p.m. OK Python 3 TESTS 45 436 6758400 1600
43968569 titia C Oct. 7, 2018, 6:39 p.m. OK Python 3 TESTS 45 452 7270400 1600
43981340 mayank_kr_verma C Oct. 8, 2018, 3:20 a.m. OK Python 3 TESTS 45 483 7270400 1600
43973914 natascha.abraschitowa C Oct. 7, 2018, 8:14 p.m. OK Python 3 TESTS 45 499 7168000 1600
43968864 varun_raj C Oct. 7, 2018, 6:41 p.m. OK Python 3 TESTS 45 514 9420800 1600
44080132 eugalt C Oct. 10, 2018, 2:41 p.m. OK Python 3 TESTS 45 530 7270400 1600
43994974 spellstaker C Oct. 8, 2018, 11:03 a.m. OK Python 3 TESTS 45 530 7270400 1600
43969373 fikr C Oct. 7, 2018, 6:45 p.m. OK Python 3 TESTS 45 545 7065600 1600
43969508 Dx18 C Oct. 7, 2018, 6:47 p.m. OK Rust TESTS 45 62 2150400 1600
43977582 clrcldy C Oct. 7, 2018, 10:27 p.m. OK Rust TESTS 45 62 2764800 1600
43960577 limed C Oct. 7, 2018, 5:40 p.m. OK Scala TESTS 45 638 0 1600
43985501 yakamoto C Oct. 8, 2018, 6:52 a.m. OK Scala TESTS 45 826 42393600 1600
43984466 yakamoto C Oct. 8, 2018, 6:06 a.m. OK Scala TESTS 45 998 34713600 1600

remove filters

Back to search problems