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 |
981
|
Avito Code Challenge 2018 |
FINISHED |
False |
10800 |
210006587 |
May 27, 2018, 2:50 p.m. |
Problems
B"Mr Keks is a typical white-collar in Byteland. He has a bookshelf in his office with some books on it, each book has an integer positive price. Mr Keks defines the value of a shelf as the sum of books prices on it. Miraculously, Mr Keks was promoted and now he is moving into a new office. He learned that in the new office he will have not a single bookshelf, but exactly k bookshelves. He decided that the beauty of the k shelves is the bitwise AND of the values of all the shelves. He also decided that he won't spend time on reordering the books, so he will place several first books on the first shelf, several next books on the next shelf and so on. Of course, he will place at least one book on each shelf. This way he will put all his books on k shelves in such a way that the beauty of the shelves is as large as possible. Compute this maximum possible beauty. The first line contains two integers n and k ( 1 <= q k <= q n <= q 50 ) -- the number of books and the number of shelves in the new office. The second line contains n integers a_1, a_2, ldots a_n , ( 0 < a_i < 2^{50} ) -- the prices of the books in the order they stand on the old shelf. Print the maximum possible beauty of k shelves in the new office. In the first example you can split the books as follows: (9 + 14 + 28 + 1 + 7) & (13 + 15) & (29 + 2) & (31) = 24. In the second example you can split the books as follows: (3 + 14 + 15 + 92) & (65) & (35 + 89) = 64. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
52845339 |
oo00000oo |
D |
April 16, 2019, 3:19 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
64 |
62 |
0 |
|
1800 |
43929148 |
vjudge5 |
D |
Oct. 7, 2018, 6:31 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
64 |
124 |
307200 |
|
1800 |
38665799 |
Gassa |
D |
May 27, 2018, 3:33 p.m. |
OK |
D |
TESTS |
64 |
31 |
0 |
|
1800 |
38682310 |
fluffyowl |
D |
May 28, 2018, 1:22 a.m. |
OK |
D |
TESTS |
64 |
31 |
102400 |
|
1800 |
38930029 |
rr_ |
D |
June 3, 2018, 8:29 p.m. |
OK |
D |
TESTS |
64 |
31 |
4403200 |
|
1800 |
38929747 |
rr_ |
D |
June 3, 2018, 8:09 p.m. |
OK |
D |
TESTS |
64 |
31 |
4403200 |
|
1800 |
38676387 |
ruban |
D |
May 27, 2018, 5:44 p.m. |
OK |
Delphi |
TESTS |
64 |
93 |
56729600 |
|
1800 |
38722017 |
Megamanvui |
D |
May 29, 2018, 2:59 p.m. |
OK |
FPC |
TESTS |
64 |
31 |
0 |
|
1800 |
38807546 |
forlfs |
D |
May 31, 2018, 4:03 p.m. |
OK |
GNU C |
TESTS |
64 |
31 |
3379200 |
|
1800 |
38669223 |
cfk |
D |
May 27, 2018, 4:06 p.m. |
OK |
GNU C++ |
TESTS |
64 |
15 |
307200 |
|
1800 |
40832230 |
prakash14 |
D |
July 27, 2018, 6:16 a.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
39321243 |
luogu_bot4 |
D |
June 16, 2018, 11:53 p.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
39321237 |
SuperBlueCat |
D |
June 16, 2018, 11:52 p.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
38696323 |
vjudge5 |
D |
May 28, 2018, 2:06 p.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
38689484 |
Scut82 |
D |
May 28, 2018, 9:18 a.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
38684505 |
hrbust_lmh |
D |
May 28, 2018, 4:45 a.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
38676262 |
sxy_to_the_end |
D |
May 27, 2018, 5:42 p.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
38670243 |
MissMyDearest |
D |
May 27, 2018, 4:18 p.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
38668935 |
VampireWeekend |
D |
May 27, 2018, 4:03 p.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
1800 |
38704799 |
EliasMera |
D |
May 28, 2018, 9:30 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
15 |
0 |
|
1800 |
38673404 |
smu201111192 |
D |
May 27, 2018, 5:01 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
15 |
102400 |
|
1800 |
39701876 |
vjudge2 |
D |
June 27, 2018, 12:50 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
39275593 |
walnutwaldo20 |
D |
June 15, 2018, 9:57 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
39034066 |
zhaopeng1997 |
D |
June 8, 2018, 1:51 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
39014659 |
SheepRanger |
D |
June 7, 2018, 9:33 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
38991115 |
RDDCCD |
D |
June 6, 2018, 10:17 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
38717227 |
OAHOBOHAO |
D |
May 29, 2018, 11:38 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
38706995 |
Jiburiru |
D |
May 29, 2018, 1:26 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
38704711 |
jasony123123 |
D |
May 28, 2018, 9:23 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
1800 |
54705823 |
madhav_1999 |
D |
May 27, 2019, 4:58 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
39238128 |
israttarin |
D |
June 14, 2018, 9:28 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
39024725 |
ankeet |
D |
June 7, 2018, 2:44 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38710103 |
mHr029 |
D |
May 29, 2018, 5:46 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38688777 |
dante_smit_98 |
D |
May 28, 2018, 8:45 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38682615 |
Vinhspm |
D |
May 28, 2018, 2:01 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38682374 |
Dragon_Fly_02 |
D |
May 28, 2018, 1:30 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38681481 |
pzdba |
D |
May 27, 2018, 11:41 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38681173 |
brimix__ |
D |
May 27, 2018, 10:56 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38679926 |
queria_ser_mauricio |
D |
May 27, 2018, 8:55 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
0 |
|
1800 |
38685599 |
Ashishgup |
D |
May 28, 2018, 5:59 a.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
0 |
|
1800 |
38682456 |
universe- |
D |
May 28, 2018, 1:39 a.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
0 |
|
1800 |
38672062 |
Antoine |
D |
May 27, 2018, 4:41 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
0 |
|
1800 |
38670335 |
csegura |
D |
May 27, 2018, 4:19 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
0 |
|
1800 |
38668271 |
vhnvn |
D |
May 27, 2018, 3:56 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
0 |
|
1800 |
38666528 |
Eran |
D |
May 27, 2018, 3:39 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
0 |
|
1800 |
52282157 |
focusvish |
D |
April 3, 2019, 5:37 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
102400 |
|
1800 |
38938322 |
huangzhen |
D |
June 4, 2018, 8:16 a.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
3379200 |
|
1800 |
38816758 |
zbtrs |
D |
June 1, 2018, 2:53 a.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
3379200 |
|
1800 |
38910236 |
CrazyMerlyn |
D |
June 3, 2018, 5:31 a.m. |
OK |
GNU C++17 |
TESTS |
64 |
15 |
3481600 |
|
1800 |
40659861 |
tyz910 |
D |
July 23, 2018, 6:33 a.m. |
OK |
Go |
TESTS |
64 |
31 |
102400 |
|
1800 |
38719499 |
sudo_pacman |
D |
May 29, 2018, 1:16 p.m. |
OK |
Go |
TESTS |
64 |
31 |
204800 |
|
1800 |
61112886 |
synapse |
D |
Sept. 23, 2019, 11:54 a.m. |
OK |
Go |
TESTS |
64 |
46 |
0 |
|
1800 |
61112235 |
synapse |
D |
Sept. 23, 2019, 11:42 a.m. |
OK |
Go |
TESTS |
64 |
46 |
0 |
|
1800 |
40659030 |
tyz910 |
D |
July 23, 2018, 6:06 a.m. |
OK |
Go |
TESTS |
64 |
46 |
204800 |
|
1800 |
38667657 |
Martynas |
D |
May 27, 2018, 3:50 p.m. |
OK |
Go |
TESTS |
64 |
46 |
204800 |
|
1800 |
46677426 |
wadissimo |
D |
Dec. 6, 2018, 10:32 a.m. |
OK |
Java 8 |
TESTS |
64 |
109 |
0 |
|
1800 |
59978613 |
yaoct |
D |
Sept. 4, 2019, 7:12 a.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
58468394 |
JCKG |
D |
Aug. 8, 2019, 9:11 p.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
47806811 |
weird_penguin |
D |
Jan. 1, 2019, 7:59 a.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
49111540 |
hongquanntct |
D |
Jan. 28, 2019, 3:09 p.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
61326797 |
chojh1222 |
D |
Sept. 26, 2019, 1:56 p.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
47806557 |
weird_penguin |
D |
Jan. 1, 2019, 7:46 a.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
46654763 |
KulikAlex |
D |
Dec. 5, 2018, 3:44 p.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
61328210 |
chojh1222 |
D |
Sept. 26, 2019, 2:16 p.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
52576668 |
jenish9599 |
D |
April 10, 2019, 4:44 p.m. |
OK |
Java 8 |
TESTS |
64 |
124 |
0 |
|
1800 |
61115663 |
vjudge2 |
D |
Sept. 23, 2019, 12:47 p.m. |
OK |
Kotlin |
TESTS |
64 |
217 |
0 |
|
1800 |
38663157 |
.o. |
D |
May 27, 2018, 3:14 p.m. |
OK |
Kotlin |
TESTS |
64 |
265 |
307200 |
|
1800 |
38686026 |
Lancern |
D |
May 28, 2018, 6:25 a.m. |
OK |
Kotlin |
TESTS |
64 |
405 |
4710400 |
|
1800 |
38918628 |
GustavK |
D |
June 3, 2018, 11:08 a.m. |
OK |
Mono C# |
TESTS |
64 |
46 |
12390400 |
|
1800 |
38666590 |
schoenus |
D |
May 27, 2018, 3:39 p.m. |
OK |
Mono C# |
TESTS |
64 |
624 |
128512000 |
|
1800 |
41997600 |
scorpiowf |
D |
Aug. 23, 2018, 1:03 p.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
61960027 |
vjudge3 |
D |
Oct. 6, 2019, 7:10 a.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
61780464 |
vjudge5 |
D |
Oct. 3, 2019, 1:01 p.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
61752003 |
vjudge5 |
D |
Oct. 3, 2019, 3:51 a.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
61691570 |
vjudge1 |
D |
Oct. 2, 2019, 5:50 a.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
48521998 |
vjudge4 |
D |
Jan. 18, 2019, 7:03 a.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
45860676 |
LoneFox |
D |
Nov. 17, 2018, 5:19 a.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
38690783 |
lanran2002 |
D |
May 28, 2018, 10:16 a.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
38667659 |
olpetOdessaONU |
D |
May 27, 2018, 3:50 p.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
38662972 |
wa1tz719 |
D |
May 27, 2018, 3:13 p.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
0 |
|
1800 |
61704654 |
vjudge5 |
D |
Oct. 2, 2019, 9:38 a.m. |
OK |
MS C++ 2017 |
TESTS |
64 |
46 |
0 |
|
1800 |
61899036 |
AleksanderBalobanov |
D |
Oct. 5, 2019, 8:05 a.m. |
OK |
MS C++ 2017 |
TESTS |
64 |
46 |
0 |
|
1800 |
50129197 |
introibo |
D |
Feb. 18, 2019, 5:28 p.m. |
OK |
PyPy 2 |
TESTS |
64 |
140 |
1024000 |
|
1800 |
50126308 |
introibo |
D |
Feb. 18, 2019, 5:12 p.m. |
OK |
PyPy 2 |
TESTS |
64 |
140 |
1331200 |
|
1800 |
50125858 |
introibo |
D |
Feb. 18, 2019, 5:09 p.m. |
OK |
PyPy 2 |
TESTS |
64 |
155 |
1024000 |
|
1800 |
52277496 |
CountZero |
D |
April 3, 2019, 3:24 p.m. |
OK |
PyPy 3 |
TESTS |
64 |
218 |
3379200 |
|
1800 |
50121079 |
introibo |
D |
Feb. 18, 2019, 4:41 p.m. |
OK |
Python 2 |
TESTS |
64 |
171 |
0 |
|
1800 |
50123002 |
introibo |
D |
Feb. 18, 2019, 4:53 p.m. |
OK |
Python 2 |
TESTS |
64 |
186 |
0 |
|
1800 |
50131915 |
introibo |
D |
Feb. 18, 2019, 5:39 p.m. |
OK |
Python 2 |
TESTS |
64 |
187 |
0 |
|
1800 |
50129650 |
introibo |
D |
Feb. 18, 2019, 5:31 p.m. |
OK |
Python 2 |
TESTS |
64 |
187 |
0 |
|
1800 |
50130864 |
introibo |
D |
Feb. 18, 2019, 5:36 p.m. |
OK |
Python 2 |
TESTS |
64 |
202 |
0 |
|
1800 |
50125462 |
introibo |
D |
Feb. 18, 2019, 5:07 p.m. |
OK |
Python 2 |
TESTS |
64 |
217 |
0 |
|
1800 |
50130482 |
introibo |
D |
Feb. 18, 2019, 5:35 p.m. |
OK |
Python 2 |
TESTS |
64 |
218 |
0 |
|
1800 |
38669250 |
MathisHammel |
D |
May 27, 2018, 4:06 p.m. |
OK |
Python 2 |
TESTS |
64 |
296 |
102400 |
|
1800 |
38678960 |
Ali_Pi |
D |
May 27, 2018, 7:57 p.m. |
OK |
Python 2 |
TESTS |
64 |
327 |
102400 |
|
1800 |
43912457 |
yujinwunz |
D |
Oct. 6, 2018, 4:53 p.m. |
OK |
Python 2 |
TESTS |
64 |
514 |
102400 |
|
1800 |
38699769 |
pyrus |
D |
May 28, 2018, 4:40 p.m. |
OK |
Python 3 |
TESTS |
64 |
155 |
0 |
|
1800 |
38992035 |
JSZX11556 |
D |
June 6, 2018, 10:48 a.m. |
OK |
Python 3 |
TESTS |
64 |
826 |
307200 |
|
1800 |
38719939 |
Korrah |
D |
May 29, 2018, 1:34 p.m. |
OK |
Python 3 |
TESTS |
64 |
951 |
4710400 |
|
1800 |
remove filters
Back to search problems