Manthan, Codefest 16

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
633 Manthan, Codefest 16 FINISHED False 9000 280673063 Feb. 26, 2016, 5:15 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2833 ) D Fibonacci-ish PROGRAMMING brute force dp hashing implementation math 2000

B'Yash has recently learnt about the Fibonacci sequence and is very excited about it. He calls a sequence Fibonacci-ish if You are given some sequence of integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an. Your task is rearrange elements of this sequence in such a way that its longest possible prefix is Fibonacci-ish sequence. The first line of the input contains a single integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) -- the length of the sequence ai. The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (|ai| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Print the length of the longest possible Fibonacci-ish prefix of the given sequence after rearrangement. In the first sample, if we rearrange elements of the sequence as xe2 x80 x89- xe2 x80 x891, 2, 1, the whole sequence ai would be Fibonacci-ish. In the second sample, the optimal way to rearrange elements is , , , , 28.'...

Tutorials

Manthan, Codefest 16: Editorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57800517 chaorenhaha D July 26, 2019, 1:06 p.m. OK FPC TESTS 118 155 0 2000
53986424 chaorenhaha D May 11, 2019, 9:58 a.m. OK FPC TESTS 118 233 0 2000
16601901 s_p D March 8, 2016, 1:26 p.m. OK GNU C TESTS 118 218 3993600 2000
17161565 hrazvan D April 4, 2016, 5:21 p.m. OK GNU C TESTS 118 686 4710400 2000
16503703 sgtlaugh D March 3, 2016, 9:43 p.m. OK GNU C TESTS 118 733 16179200 2000
16503692 sgtlaugh D March 3, 2016, 9:42 p.m. OK GNU C TESTS 118 748 16179200 2000
16503729 sgtlaugh D March 3, 2016, 9:45 p.m. OK GNU C TESTS 118 811 307200 2000
16503740 sgtlaugh D March 3, 2016, 9:45 p.m. OK GNU C TESTS 118 826 921600 2000
16503663 sgtlaugh D March 3, 2016, 9:40 p.m. OK GNU C TESTS 118 1138 16179200 2000
16372898 sgtlaugh D Feb. 27, 2016, 6:07 a.m. OK GNU C TESTS 118 1263 16179200 2000
16384139 Vlad_kv D Feb. 27, 2016, 1:53 p.m. OK GNU C++ TESTS 118 31 0 2000
16534176 Arturia D March 5, 2016, 12:54 p.m. OK GNU C++ TESTS 118 46 0 2000
18911180 AkaneSasu D July 6, 2016, 4:04 a.m. OK GNU C++ TESTS 118 46 0 2000
16730533 spsmoj3 D March 15, 2016, 4 p.m. OK GNU C++ TESTS 118 46 0 2000
16555978 _eXe_ D March 6, 2016, 6:01 p.m. OK GNU C++ TESTS 118 46 0 2000
16388502 rodrigozhou D Feb. 27, 2016, 5:20 p.m. OK GNU C++ TESTS 118 46 0 2000
16385978 T1024 D Feb. 27, 2016, 3:30 p.m. OK GNU C++ TESTS 118 46 0 2000
16371838 sentews5 D Feb. 27, 2016, 5:17 a.m. OK GNU C++ TESTS 118 46 0 2000
16374114 sauterne D Feb. 27, 2016, 7:01 a.m. OK GNU C++ TESTS 118 46 204800 2000
26492192 vjudge5 D April 19, 2017, 9:22 a.m. OK GNU C++ TESTS 118 46 2150400 2000
57108321 rainboy D July 15, 2019, 4:11 p.m. OK GNU C11 TESTS 118 1263 409600 2000
16647733 giwoo123 D March 11, 2016, 11:55 a.m. OK GNU C++11 TESTS 118 46 0 2000
16420558 I_love_code D Feb. 29, 2016, 4:36 a.m. OK GNU C++11 TESTS 118 46 0 2000
16400682 Quang D Feb. 28, 2016, 10:01 a.m. OK GNU C++11 TESTS 118 46 0 2000
16388941 yarek D Feb. 27, 2016, 5:39 p.m. OK GNU C++11 TESTS 118 46 0 2000
16376384 Jhamra D Feb. 27, 2016, 8:37 a.m. OK GNU C++11 TESTS 118 46 0 2000
16480051 mshokry10 D March 3, 2016, 9:28 a.m. OK GNU C++11 TESTS 118 46 0 2000
16377832 Rafbill D Feb. 27, 2016, 9:27 a.m. OK GNU C++11 TESTS 118 46 102400 2000
61471713 Potassium D Sept. 29, 2019, 12:37 p.m. OK GNU C++11 TESTS 118 46 102400 2000
16645618 MaGaroo D March 11, 2016, 9:17 a.m. OK GNU C++11 TESTS 118 46 614400 2000
26067176 andwho D April 2, 2017, 1:21 a.m. OK GNU C++11 TESTS 118 46 2150400 2000
62652238 lincolnx D Oct. 15, 2019, 10:21 p.m. OK GNU C++14 TESTS 118 46 204800 2000
62652456 lincolnx D Oct. 15, 2019, 10:30 p.m. OK GNU C++14 TESTS 118 46 204800 2000
28598704 ThSonNguyen D July 16, 2017, 2:56 p.m. OK GNU C++14 TESTS 118 46 2150400 2000
23384634 Ali.Pi D Dec. 28, 2016, 6:39 p.m. OK GNU C++14 TESTS 118 62 2150400 2000
62652480 lincolnx D Oct. 15, 2019, 10:31 p.m. OK GNU C++14 TESTS 118 77 204800 2000
34491780 ForgotToUpsolve D Jan. 23, 2018, 5:59 p.m. OK GNU C++14 TESTS 118 93 2150400 2000
58200232 bojverdict1 D Aug. 3, 2019, 3:42 a.m. OK GNU C++14 TESTS 118 108 204800 2000
21844726 pvs D Oct. 28, 2016, 11:15 a.m. OK GNU C++14 TESTS 118 109 204800 2000
58159889 bojverdict2 D Aug. 2, 2019, 7:03 a.m. OK GNU C++14 TESTS 118 140 11673600 2000
58199536 bojverdict1 D Aug. 3, 2019, 3:11 a.m. OK GNU C++14 TESTS 118 156 204800 2000
62381060 anakib1 D Oct. 11, 2019, 7:09 p.m. OK GNU C++17 TESTS 118 61 204800 2000
45098291 chirs241097 D Oct. 30, 2018, 12:45 p.m. OK GNU C++17 TESTS 118 62 307200 2000
58211473 1509cxt D Aug. 3, 2019, 8:59 a.m. OK GNU C++17 TESTS 118 93 131788800 2000
58199804 sjtuily D Aug. 3, 2019, 3:24 a.m. OK GNU C++17 TESTS 118 108 204800 2000
58211836 1509cxt D Aug. 3, 2019, 9:06 a.m. OK GNU C++17 TESTS 118 109 20070400 2000
58211583 1509cxt D Aug. 3, 2019, 9:01 a.m. OK GNU C++17 TESTS 118 109 131788800 2000
42279548 Ahmed_Morsy D Aug. 30, 2018, 1:29 p.m. OK GNU C++17 TESTS 118 139 2355200 2000
58915635 preetikkb D Aug. 16, 2019, 2:51 p.m. OK GNU C++17 TESTS 118 202 204800 2000
44008020 IceQuarze D Oct. 8, 2018, 4:50 p.m. OK GNU C++17 TESTS 118 202 21196800 2000
44007336 IceQuarze D Oct. 8, 2018, 4:30 p.m. OK GNU C++17 TESTS 118 217 21196800 2000
17592751 mengsungwu D April 30, 2016, 9:49 a.m. OK Go TESTS 118 186 6041600 2000
67674723 CodAR D Dec. 26, 2019, 11:56 p.m. OK Java 11 TESTS 118 2964 0 2000
17164257 alnaser.alnaser D April 4, 2016, 9:31 p.m. OK Java 7 TESTS 118 155 40140800 2000
19316257 vjudge3 D July 22, 2016, 6:40 a.m. OK Java 7 TESTS 118 545 5632000 2000
16434065 suigingin D March 1, 2016, 12:04 a.m. OK Java 7 TESTS 118 842 71065600 2000
16377668 danbanica D Feb. 27, 2016, 9:21 a.m. OK Java 7 TESTS 118 857 114995200 2000
16372127 DukeOfYork D Feb. 27, 2016, 5:31 a.m. OK Java 7 TESTS 118 1060 71884800 2000
16469164 suigingin D March 2, 2016, 4:47 p.m. OK Java 7 TESTS 118 1076 86323200 2000
16376258 Tron271828 D Feb. 27, 2016, 8:32 a.m. OK Java 7 TESTS 118 1138 87961600 2000
16469242 suigingin D March 2, 2016, 4:51 p.m. OK Java 7 TESTS 118 1231 87142400 2000
16469398 suigingin D March 2, 2016, 5 p.m. OK Java 7 TESTS 118 1294 87142400 2000
16369015 AndreySiunov D Feb. 26, 2016, 7:36 p.m. OK Java 7 TESTS 118 2557 0 2000
59408202 Jarik D Aug. 24, 2019, 2:44 p.m. OK Java 8 TESTS 118 280 0 2000
16377437 indy256 D Feb. 27, 2016, 9:13 a.m. OK Java 8 TESTS 118 327 0 2000
16638933 di_halt D March 10, 2016, 7:28 p.m. OK Java 8 TESTS 118 389 0 2000
26899697 vjudge5 D May 6, 2017, 11:16 a.m. OK Java 8 TESTS 118 405 0 2000
16638895 di_halt D March 10, 2016, 7:25 p.m. OK Java 8 TESTS 118 420 0 2000
16394441 DangTH D Feb. 27, 2016, 10:46 p.m. OK Java 8 TESTS 118 452 0 2000
16366768 WhatIsLove D Feb. 26, 2016, 7:14 p.m. OK Java 8 TESTS 118 483 0 2000
16434438 mikcorer D March 1, 2016, 1:24 a.m. OK Java 8 TESTS 118 514 0 2000
16375164 threepipes_s D Feb. 27, 2016, 7:47 a.m. OK Java 8 TESTS 118 514 0 2000
16434395 mikcorer D March 1, 2016, 1:15 a.m. OK Java 8 TESTS 118 577 0 2000
22220387 ramil.agger D Nov. 15, 2016, 10:42 a.m. OK Kotlin TESTS 118 1996 76595200 2000
16377642 DVRazor D Feb. 27, 2016, 9:21 a.m. OK MS C# TESTS 118 265 5632000 2000
16371805 azukun D Feb. 27, 2016, 5:16 a.m. OK MS C# TESTS 118 265 5632000 2000
16395158 renadeen D Feb. 28, 2016, 12:49 a.m. OK MS C# TESTS 118 1294 60006400 2000
16405860 renadeen D Feb. 28, 2016, 3:44 p.m. OK MS C# TESTS 118 1357 60108800 2000
19320225 vjudge5 D July 22, 2016, 9:12 a.m. OK MS C++ TESTS 118 46 4096000 2000
16372469 mostafa_9a7c2 D Feb. 27, 2016, 5:45 a.m. OK MS C++ TESTS 118 61 25292800 2000
19454290 vjudge5 D July 28, 2016, 4:55 a.m. OK MS C++ TESTS 118 62 0 2000
16379562 regkelvin D Feb. 27, 2016, 10:39 a.m. OK MS C++ TESTS 118 109 0 2000
19320603 vjudge4 D July 22, 2016, 9:28 a.m. OK MS C++ TESTS 118 358 0 2000
16378940 iamexist D Feb. 27, 2016, 10:11 a.m. OK MS C++ TESTS 118 374 102400 2000
16386086 SpOleM D Feb. 27, 2016, 3:36 p.m. OK MS C++ TESTS 118 421 22220800 2000
20328027 KrukovAA D Sept. 1, 2016, 5:55 p.m. OK MS C++ TESTS 118 483 8806400 2000
16426543 Mosyagin D Feb. 29, 2016, 1:21 p.m. OK MS C++ TESTS 118 499 32153600 2000
16375728 I_always_love_cc D Feb. 27, 2016, 8:10 a.m. OK MS C++ TESTS 118 546 0 2000
64790147 hi_allerria D Nov. 13, 2019, 10:51 a.m. OK MS C++ 2017 TESTS 118 124 307200 2000
58199645 sjtuily D Aug. 3, 2019, 3:16 a.m. OK MS C++ 2017 TESTS 118 171 102400 2000
45111308 wangkan2001 D Oct. 30, 2018, 6:40 p.m. OK PyPy 2 TESTS 118 218 2662400 2000
16365209 mirs D Feb. 26, 2016, 6:58 p.m. OK PyPy 2 TESTS 118 1076 97280000 2000
16368893 avamsi D Feb. 26, 2016, 7:35 p.m. OK PyPy 2 TESTS 118 1715 33177600 2000
16501183 avamsi D March 3, 2016, 7:28 p.m. OK PyPy 2 TESTS 118 1934 33177600 2000
32010793 yugle7 D Nov. 3, 2017, 2:45 p.m. OK PyPy 3 TESTS 118 280 5120000 2000
16553359 cugel D March 6, 2016, 2:05 p.m. OK PyPy 3 TESTS 118 342 4198400 2000
20424363 Remarque D Sept. 6, 2016, 7:35 p.m. OK PyPy 3 TESTS 118 374 8806400 2000
30659354 madn D Sept. 24, 2017, 7:42 a.m. OK PyPy 3 TESTS 118 2480 6041600 2000
59102507 __guvi__ D Aug. 19, 2019, 4:38 p.m. OK PyPy 3 TESTS 118 2496 7475200 2000
16393933 justinz2018 D Feb. 27, 2016, 9:53 p.m. OK PyPy 3 TESTS 118 2558 6144000 2000
45111257 wangkan2001 D Oct. 30, 2018, 6:38 p.m. OK Python 2 TESTS 118 1403 102400 2000
16410071 sergio89 D Feb. 28, 2016, 6:39 p.m. OK Python 2 TESTS 118 1543 67584000 2000
16731088 orailly D March 15, 2016, 4:41 p.m. OK Python 3 TESTS 118 842 9625600 2000
16731376 orailly D March 15, 2016, 4:59 p.m. OK Python 3 TESTS 118 919 9523200 2000
16381691 progiv D Feb. 27, 2016, 12:09 p.m. OK Python 3 TESTS 118 1185 614400 2000
16558601 oldanon D March 6, 2016, 10 p.m. OK Python 3 TESTS 118 1216 18329600 2000
16384934 Vosatorp D Feb. 27, 2016, 2:33 p.m. OK Python 3 TESTS 118 1419 614400 2000
16778111 PythonIt D March 18, 2016, 8:37 a.m. OK Python 3 TESTS 118 1435 614400 2000
20164618 harry_potter_28 D Aug. 25, 2016, 10:32 p.m. OK Python 3 TESTS 118 1637 5222400 2000
16366413 andrey.starodubtsev D Feb. 26, 2016, 7:11 p.m. OK Python 3 TESTS 118 1793 307200 2000
19199578 aste D July 18, 2016, 3:12 a.m. OK Python 3 TESTS 118 2682 512000 2000
16591997 Bytorr D March 7, 2016, 8:43 p.m. OK Ruby TESTS 118 904 3174400 2000

remove filters

Back to search problems