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
( 10097 ) B Square Difference PROGRAMMING math number theory 1100

B'Alice has a lovely piece of cloth. It has the shape of a square with a side of length a centimeters. Bob also wants such piece of cloth. He would prefer a square with a side of length b centimeters (where b < a ). Alice wanted to make Bob happy, so she cut the needed square out of the corner of her piece and gave it to Bob. Now she is left with an ugly L shaped cloth (see pictures below). Alice would like to know whether the area of her cloth expressed in square centimeters is prime. Could you help her to determine it? The first line contains a number t ( 1 <= q t <= q 5 ) -- the number of test cases. Each of the next t lines describes the i -th test case. It contains two integers a and b~(1 <= q b < a <= q 10^{11}) -- the side length of Alice 's square and the side length of the square that Bob wants. Print t lines, where the i -th line is the answer to the i -th test case. Print "YES" (without quotes) if the area of the remaining piece of cloth is prime, otherwise print "NO". You can print each letter in an arbitrary case (upper or lower). The figure below depicts the first test case. The blue part corresponds to the piece which belongs to Bob, and the red part is the piece that Alice keeps for herself. The area of the red part is 6^2 - 5^2 = 36 - 25 = 11 , which is prime, so the answer is "YES". In the second case, the area is 16^2 - 13^2 = 87 , which is divisible by 3 . In the third case, the area of the remaining piece is 61690850361^2 - 24777622630^2 = 3191830435068605713421 . This number is not prime because 3191830435068605713421 = 36913227731 cdot 86468472991 . In the last case, the area is 34^2 - 33^2 = 67 . '...

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
43997787 sakurakatana B Oct. 8, 2018, 12:20 p.m. OK Clang++17 Diagnostics TESTS 59 61 0 1100
44385440 N1ukash B Oct. 16, 2018, 5:26 a.m. OK Clang++17 Diagnostics TESTS 59 61 307200 1100
51403791 Veyron404 B March 17, 2019, 8:48 a.m. OK Clang++17 Diagnostics TESTS 59 62 0 1100
49179193 luogu_bot1 B Jan. 29, 2019, 11:45 p.m. OK FPC TESTS 59 31 0 1100
43960687 PAG B Oct. 7, 2018, 5:40 p.m. OK FPC TESTS 59 31 0 1100
43954933 ruban B Oct. 7, 2018, 5:18 p.m. OK FPC TESTS 59 46 2457600 1100
67993993 BugLeave B Dec. 31, 2019, 6:57 a.m. OK GNU C11 TESTS 59 15 0 1100
44942608 vjudge4 B Oct. 27, 2018, 8:35 a.m. OK GNU C11 TESTS 59 30 0 1100
58982213 vjudge3 B Aug. 18, 2019, 5:06 a.m. OK GNU C11 TESTS 59 31 0 1100
55811162 saisitaram2000 B June 20, 2019, 3:51 a.m. OK GNU C11 TESTS 59 31 0 1100
55750242 returaj0808 B June 19, 2019, 12:20 p.m. OK GNU C11 TESTS 59 31 0 1100
68234188 mth1908 B Jan. 5, 2020, 10:19 a.m. OK GNU C11 TESTS 59 31 0 1100
65475549 DevJewel B Nov. 21, 2019, 9:56 a.m. OK GNU C11 TESTS 59 31 0 1100
60447031 Hiddenboy99 B Sept. 12, 2019, 2:30 p.m. OK GNU C11 TESTS 59 31 0 1100
59207044 dexter04 B Aug. 21, 2019, 7:17 a.m. OK GNU C11 TESTS 59 31 0 1100
58999668 Munawer_Taj B Aug. 18, 2019, 1:08 p.m. OK GNU C11 TESTS 59 31 0 1100
46278487 slip990716 B Nov. 27, 2018, 12:09 p.m. OK GNU C++11 TESTS 59 30 0 1100
43990549 MSTXI B Oct. 8, 2018, 9:54 a.m. OK GNU C++11 TESTS 59 30 0 1100
43954753 pishbeenZ B Oct. 7, 2018, 5:17 p.m. OK GNU C++11 TESTS 59 30 0 1100
52626489 RedBtats B April 12, 2019, 3:55 a.m. OK GNU C++11 TESTS 59 30 0 1100
54366284 mmmod_lqs B May 19, 2019, 3:07 a.m. OK GNU C++11 TESTS 59 30 0 1100
69795798 vjudge1 B Jan. 29, 2020, 8:04 p.m. OK GNU C++11 TESTS 59 31 0 1100
68688631 tahasin B Jan. 13, 2020, 4:58 a.m. OK GNU C++11 TESTS 59 31 0 1100
68894169 yosiachrst B Jan. 16, 2020, 3:41 a.m. OK GNU C++11 TESTS 59 31 0 1100
68977366 _Kema_ B Jan. 17, 2020, 9:21 a.m. OK GNU C++11 TESTS 59 31 0 1100
69292872 Omar_Elaraby B Jan. 22, 2020, 11:02 a.m. OK GNU C++11 TESTS 59 31 0 1100
43955200 nitishk24 B Oct. 7, 2018, 5:19 p.m. OK GNU C++14 TESTS 59 15 0 1100
43954508 Fdg B Oct. 7, 2018, 5:16 p.m. OK GNU C++14 TESTS 59 15 0 1100
43976854 Ravi B Oct. 7, 2018, 9:44 p.m. OK GNU C++14 TESTS 59 15 0 1100
62851820 deekshitha1017 B Oct. 18, 2019, 7:40 a.m. OK GNU C++14 TESTS 59 30 0 1100
55428816 _Seyed37_ B June 11, 2019, 10:20 a.m. OK GNU C++14 TESTS 59 30 0 1100
54844712 vivekkumar.kaka B May 30, 2019, 1:18 p.m. OK GNU C++14 TESTS 59 30 0 1100
54642759 smir2k14 B May 25, 2019, 8:41 p.m. OK GNU C++14 TESTS 59 30 0 1100
54186295 ark__n B May 15, 2019, 2:58 p.m. OK GNU C++14 TESTS 59 30 0 1100
64588102 Naim_Hasan B Nov. 9, 2019, 1:54 p.m. OK GNU C++14 TESTS 59 30 0 1100
61105293 Scut82 B Sept. 23, 2019, 8:54 a.m. OK GNU C++14 TESTS 59 30 0 1100
44726728 BlackRain B Oct. 23, 2018, 8:23 a.m. OK GNU C++17 TESTS 59 15 307200 1100
52157993 manish_joshi B April 1, 2019, 2:05 p.m. OK GNU C++17 TESTS 59 30 0 1100
52953277 Mr.Gzj B April 18, 2019, 12:46 p.m. OK GNU C++17 TESTS 59 30 0 1100
51071213 Moin B March 9, 2019, 7:44 a.m. OK GNU C++17 TESTS 59 30 0 1100
53802288 rawson_1703113 B May 5, 2019, 7:49 p.m. OK GNU C++17 TESTS 59 30 0 1100
58946028 LoNgLoNgDoUblE B Aug. 17, 2019, 9 a.m. OK GNU C++17 TESTS 59 30 0 1100
59915018 Alien_beard B Sept. 2, 2019, 6:46 p.m. OK GNU C++17 TESTS 59 30 0 1100
60698048 NightRage B Sept. 16, 2019, 8:53 p.m. OK GNU C++17 TESTS 59 30 0 1100
63653459 vjudge4 B Oct. 28, 2019, 12:03 p.m. OK GNU C++17 TESTS 59 30 0 1100
63932659 Iron_man_3000love B Oct. 31, 2019, 2:45 p.m. OK GNU C++17 TESTS 59 30 0 1100
43971426 Martynas B Oct. 7, 2018, 7:02 p.m. OK Go TESTS 59 46 0 1100
44021232 Haar B Oct. 9, 2018, 4:23 a.m. OK Haskell TESTS 59 93 8499200 1100
44200619 alexander89116 B Oct. 12, 2018, 3:18 p.m. OK Java 8 TESTS 59 109 0 1100
44063594 Hredoy_Biswas B Oct. 10, 2018, 7:40 a.m. OK Java 8 TESTS 59 109 0 1100
68589588 akshVerma B Jan. 11, 2020, 12:17 p.m. OK Java 8 TESTS 59 124 0 1100
69051687 StEpAn_123 B Jan. 18, 2020, 12:58 p.m. OK Java 8 TESTS 59 124 0 1100
68688398 tahasin B Jan. 13, 2020, 4:52 a.m. OK Java 8 TESTS 59 124 0 1100
58794024 juan.suarez B Aug. 14, 2019, 3:59 a.m. OK Java 8 TESTS 59 124 0 1100
57381621 valerikk2 B July 20, 2019, 2:49 p.m. OK Java 8 TESTS 59 124 0 1100
48993178 sundarcj B Jan. 26, 2019, 3:21 p.m. OK Java 8 TESTS 59 124 0 1100
48166233 I.A.K.O.V B Jan. 10, 2019, 1:35 a.m. OK Java 8 TESTS 59 124 0 1100
46926257 sooraj10 B Dec. 12, 2018, 8:52 a.m. OK Java 8 TESTS 59 124 0 1100
44545581 LazyFabric B Oct. 19, 2018, 1:19 p.m. OK JavaScript TESTS 59 46 0 1100
43956485 Jarekczek B Oct. 7, 2018, 5:23 p.m. OK Kotlin TESTS 59 171 0 1100
43958626 Lishy2010 B Oct. 7, 2018, 5:31 p.m. OK Kotlin TESTS 59 187 0 1100
43967088 raynald B Oct. 7, 2018, 6:25 p.m. OK Kotlin TESTS 59 202 102400 1100
53315037 treasuryonly B April 26, 2019, 9:38 a.m. OK Mono C# TESTS 59 46 0 1100
55721787 og.kostya B June 18, 2019, 3:39 p.m. OK Mono C# TESTS 59 46 0 1100
43975009 danilprokat B Oct. 7, 2018, 8:37 p.m. OK Mono C# TESTS 59 61 0 1100
43975087 danilprokat B Oct. 7, 2018, 8:38 p.m. OK Mono C# TESTS 59 61 0 1100
58640637 vjudge2 B Aug. 12, 2019, 3:19 a.m. OK Mono C# TESTS 59 61 0 1100
43974036 danilprokat B Oct. 7, 2018, 8:16 p.m. OK Mono C# TESTS 59 61 0 1100
51481451 nemars B March 19, 2019, 11:46 a.m. OK Mono C# TESTS 59 62 0 1100
44044096 Ruban_Denic B Oct. 9, 2018, 4:15 p.m. OK Mono C# TESTS 59 62 0 1100
43975150 danilprokat B Oct. 7, 2018, 8:40 p.m. OK Mono C# TESTS 59 62 0 1100
43974701 danilprokat B Oct. 7, 2018, 8:30 p.m. OK Mono C# TESTS 59 62 0 1100
44973104 vjudge4 B Oct. 28, 2018, 2:52 a.m. OK MS C++ TESTS 59 30 0 1100
58162160 vjudge4 B Aug. 2, 2019, 7:49 a.m. OK MS C++ TESTS 59 31 0 1100
58169391 vjudge2 B Aug. 2, 2019, 10:35 a.m. OK MS C++ TESTS 59 31 0 1100
58173224 vjudge3 B Aug. 2, 2019, 12:08 p.m. OK MS C++ TESTS 59 31 0 1100
59425393 vjudge4 B Aug. 25, 2019, 1:57 a.m. OK MS C++ TESTS 59 31 0 1100
63653424 vjudge4 B Oct. 28, 2019, 12:02 p.m. OK MS C++ TESTS 59 31 0 1100
52062415 vjudge1 B March 31, 2019, 2:32 a.m. OK MS C++ TESTS 59 31 0 1100
53979620 vjudge5 B May 11, 2019, 6:27 a.m. OK MS C++ TESTS 59 31 0 1100
57775773 vjudge1 B July 26, 2019, 3:25 a.m. OK MS C++ TESTS 59 31 0 1100
53979661 vjudge5 B May 11, 2019, 6:28 a.m. OK MS C++ TESTS 59 31 0 1100
66868879 edik.473 B Dec. 14, 2019, 1:03 p.m. OK MS C++ 2017 TESTS 59 31 0 1100
63652858 vjudge5 B Oct. 28, 2019, 11:54 a.m. OK MS C++ 2017 TESTS 59 31 0 1100
60346517 Mad112233 B Sept. 10, 2019, 12:46 p.m. OK MS C++ 2017 TESTS 59 31 0 1100
58197772 vjudge1 B Aug. 3, 2019, 2:02 a.m. OK MS C++ 2017 TESTS 59 31 0 1100
58177274 vjudge5 B Aug. 2, 2019, 1:35 p.m. OK MS C++ 2017 TESTS 59 31 0 1100
58176730 vjudge3 B Aug. 2, 2019, 1:22 p.m. OK MS C++ 2017 TESTS 59 31 0 1100
58169468 vjudge4 B Aug. 2, 2019, 10:36 a.m. OK MS C++ 2017 TESTS 59 31 0 1100
58163950 vjudge5 B Aug. 2, 2019, 8:24 a.m. OK MS C++ 2017 TESTS 59 31 0 1100
58157710 vjudge3 B Aug. 2, 2019, 6:19 a.m. OK MS C++ 2017 TESTS 59 31 0 1100
51460926 MRamanauskas B March 18, 2019, 7:40 p.m. OK MS C++ 2017 TESTS 59 31 0 1100
43963104 sk0 B Oct. 7, 2018, 5:54 p.m. OK Ocaml TESTS 59 62 307200 1100
43961945 Lucky_cat777 B Oct. 7, 2018, 5:47 p.m. OK PascalABC.NET TESTS 59 61 0 1100
43961955 Arcadii B Oct. 7, 2018, 5:47 p.m. OK PascalABC.NET TESTS 59 62 0 1100
43962264 l-_-l B Oct. 7, 2018, 5:49 p.m. OK PascalABC.NET TESTS 59 62 102400 1100
44238983 c1729 B Oct. 13, 2018, 6:09 a.m. OK PyPy 2 TESTS 59 124 0 1100
44362560 kd710306 B Oct. 15, 2018, 3:12 p.m. OK PyPy 2 TESTS 59 124 204800 1100
43962934 KDRockzz777 B Oct. 7, 2018, 5:53 p.m. OK PyPy 2 TESTS 59 140 204800 1100
43988536 deterministic_p B Oct. 8, 2018, 8:49 a.m. OK PyPy 2 TESTS 59 140 307200 1100
44054717 masonsbro B Oct. 9, 2018, 10:13 p.m. OK PyPy 2 TESTS 59 155 204800 1100
43958136 geek_geek B Oct. 7, 2018, 5:29 p.m. OK PyPy 2 TESTS 59 155 204800 1100
43952619 YESMAths B Oct. 7, 2018, 5:10 p.m. OK PyPy 2 TESTS 59 155 307200 1100
43983545 apoorv1999 B Oct. 8, 2018, 5:19 a.m. OK PyPy 2 TESTS 59 156 409600 1100
43966474 figdan B Oct. 7, 2018, 6:20 p.m. OK PyPy 2 TESTS 59 171 307200 1100
43956403 pedrosorio B Oct. 7, 2018, 5:23 p.m. OK PyPy 2 TESTS 59 171 307200 1100
45342880 jjovan B Nov. 5, 2018, 10:55 p.m. OK PyPy 3 TESTS 59 139 0 1100
44409868 omarnvidia B Oct. 16, 2018, 4:18 p.m. OK PyPy 3 TESTS 59 140 0 1100
43983803 tranphuminhbkhn B Oct. 8, 2018, 5:32 a.m. OK PyPy 3 TESTS 59 140 0 1100
63611972 asmans B Oct. 27, 2019, 5:40 p.m. OK PyPy 3 TESTS 59 140 1331200 1100
43964664 semicfly B Oct. 7, 2018, 6:05 p.m. OK PyPy 3 TESTS 59 155 0 1100
43960983 Coding_genius B Oct. 7, 2018, 5:42 p.m. OK PyPy 3 TESTS 59 155 0 1100
45331144 petiteteaparty B Nov. 5, 2018, 3:17 p.m. OK PyPy 3 TESTS 59 155 102400 1100
44033143 johnzeng B Oct. 9, 2018, 11:49 a.m. OK PyPy 3 TESTS 59 155 1024000 1100
68119013 galim665 B Jan. 3, 2020, 12:34 p.m. OK PyPy 3 TESTS 59 155 1331200 1100
64813835 vovik123 B Nov. 13, 2019, 2:57 p.m. OK PyPy 3 TESTS 59 155 1331200 1100
43962127 Jblumen B Oct. 7, 2018, 5:48 p.m. OK Python 2 TESTS 59 187 0 1100
43962318 WileE.Coyote B Oct. 7, 2018, 5:50 p.m. OK Python 2 TESTS 59 187 102400 1100
43955319 BenniKartefla B Oct. 7, 2018, 5:19 p.m. OK Python 2 TESTS 59 202 307200 1100
43985952 hugoduar B Oct. 8, 2018, 7:12 a.m. OK Python 2 TESTS 59 217 307200 1100
43955293 Heisenbug B Oct. 7, 2018, 5:19 p.m. OK Python 2 TESTS 59 217 307200 1100
43963981 amiratou B Oct. 7, 2018, 6:01 p.m. OK Python 2 TESTS 59 233 307200 1100
43968156 TheKaibosh B Oct. 7, 2018, 6:35 p.m. OK Python 2 TESTS 59 249 204800 1100
43960163 Froz B Oct. 7, 2018, 5:38 p.m. OK Python 2 TESTS 59 249 307200 1100
43959915 shubhankarsharma00 B Oct. 7, 2018, 5:36 p.m. OK Python 2 TESTS 59 296 3788800 1100
43965648 mars.leezm B Oct. 7, 2018, 6:13 p.m. OK Python 2 TESTS 59 296 3891200 1100
44682776 danyad2001 B Oct. 22, 2018, 7:35 a.m. OK Python 3 TESTS 59 109 0 1100
45113829 LionCheetah B Oct. 30, 2018, 8:02 p.m. OK Python 3 TESTS 59 124 0 1100
44177542 raj_13ee B Oct. 12, 2018, 9:35 a.m. OK Python 3 TESTS 59 124 0 1100
43966470 hungry_fool B Oct. 7, 2018, 6:20 p.m. OK Python 3 TESTS 59 124 0 1100
43962454 gamithra B Oct. 7, 2018, 5:50 p.m. OK Python 3 TESTS 59 124 0 1100
43959021 vivek_shah B Oct. 7, 2018, 5:33 p.m. OK Python 3 TESTS 59 124 0 1100
51041310 ashok123 B March 8, 2019, 5:05 p.m. OK Python 3 TESTS 59 155 512000 1100
51041280 ashok123 B March 8, 2019, 5:05 p.m. OK Python 3 TESTS 59 155 512000 1100
43961807 Gleb_Kazantaev B Oct. 7, 2018, 5:46 p.m. OK Python 3 TESTS 59 171 512000 1100
43960642 pplo_123 B Oct. 7, 2018, 5:40 p.m. OK Python 3 TESTS 59 171 921600 1100
43993426 ghoast B Oct. 8, 2018, 10:16 a.m. OK Ruby TESTS 59 405 204800 1100
43975453 clrcldy B Oct. 7, 2018, 8:48 p.m. OK Rust TESTS 59 31 0 1100
43961927 Dx18 B Oct. 7, 2018, 5:47 p.m. OK Rust TESTS 59 62 0 1100
43956972 yakamoto B Oct. 7, 2018, 5:24 p.m. OK Scala TESTS 59 545 0 1100
43958036 limed B Oct. 7, 2018, 5:28 p.m. OK Scala TESTS 59 607 0 1100
43980531 pazthor B Oct. 8, 2018, 2:23 a.m. OK Scala TESTS 59 623 4812800 1100
43957251 wrick B Oct. 7, 2018, 5:25 p.m. OK Scala TESTS 59 639 0 1100

remove filters

Back to search problems