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.
Problems
B'There is a deck of n cards, each card has one of k types. You are given the sequence a_1, a_2, ... , a_n denoting the types of cards in the deck from top to bottom. Both n and k are even numbers. You play a game with these cards. First, you draw k topmost cards from the deck. Then, the following happens each turn of the game: You have to calculate the maximum number of coins you can earn during the game. The first line of the input contains two integers n and k ( 2 <= k <= n <= 1000 , both n and k are even). The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= k ). Print one integer -- the maximum number of coins you can earn. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
260942035 |
ERoslon |
F |
May 14, 2024, 2:36 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
62 |
102400 |
|
3000 |
259946141 |
Kanosword |
F |
May 8, 2024, 4:04 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
62 |
102400 |
|
3000 |
263230635 |
cyz2010 |
F |
May 30, 2024, 11:32 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
77 |
102400 |
|
3000 |
263192795 |
vjudge.7 |
F |
May 30, 2024, 12:30 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
77 |
8192000 |
|
3000 |
263192720 |
gdf_yhm |
F |
May 30, 2024, 12:28 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
77 |
8192000 |
|
3000 |
262147390 |
lexiyvv |
F |
May 22, 2024, 12:46 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
78 |
0 |
|
3000 |
262877630 |
bdfs_then_CSDN |
F |
May 27, 2024, 12:15 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
93 |
16076800 |
|
3000 |
261521318 |
zhouyuheng2009 |
F |
May 18, 2024, 11:22 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
108 |
204800 |
|
3000 |
261521905 |
zhouyuheng2009 |
F |
May 18, 2024, 11:26 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
109 |
204800 |
|
3000 |
263613728 |
vjudge3 |
F |
June 1, 2024, 10:32 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
60 |
124 |
17408000 |
|
3000 |
262192432 |
mnbvcxz123_long_dick |
F |
May 22, 2024, 8:18 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
61 |
0 |
|
3000 |
262375783 |
phirtheta |
F |
May 24, 2024, 11:20 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
61 |
102400 |
|
3000 |
260857683 |
TheSahib |
F |
May 13, 2024, 9:26 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
61 |
3584000 |
|
3000 |
263194936 |
vjudge.10 |
F |
May 30, 2024, 2:47 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
61 |
4096000 |
|
3000 |
261329499 |
YeahPotato |
F |
May 17, 2024, 12:36 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
61 |
4096000 |
|
3000 |
260950111 |
tml27 |
F |
May 14, 2024, 3:44 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
62 |
0 |
|
3000 |
262337489 |
Nabuko |
F |
May 24, 2024, 5:33 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
62 |
102400 |
|
3000 |
263224315 |
vjudge2 |
F |
May 30, 2024, 10:46 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
62 |
4096000 |
|
3000 |
260538116 |
Emma194 |
F |
May 11, 2024, 12:46 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
77 |
4096000 |
|
3000 |
263227307 |
Teja-Smart |
F |
May 30, 2024, 11:08 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
60 |
78 |
0 |
|
3000 |
262204926 |
luogu_bot2 |
F |
May 23, 2024, 1:03 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
61 |
102400 |
|
3000 |
263230913 |
vjudge.8 |
F |
May 30, 2024, 11:34 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
62 |
102400 |
|
3000 |
262151408 |
Pengzt |
F |
May 22, 2024, 1:16 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
62 |
102400 |
|
3000 |
260243637 |
lujjinalhaj2003 |
F |
May 10, 2024, 11:32 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
62 |
716800 |
|
3000 |
263221419 |
vjudge4 |
F |
May 30, 2024, 10:23 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
62 |
4096000 |
|
3000 |
263196367 |
_maojun_ |
F |
May 30, 2024, 3:29 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
62 |
4096000 |
|
3000 |
263229440 |
ty_ak |
F |
May 30, 2024, 11:24 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
62 |
4198400 |
|
3000 |
259900439 |
kmjp |
F |
May 7, 2024, 4:01 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
62 |
4198400 |
|
3000 |
261037446 |
MohammadMx |
F |
May 15, 2024, 10:20 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
77 |
0 |
|
3000 |
262203523 |
Pengzt |
F |
May 23, 2024, 12:26 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
60 |
77 |
102400 |
|
3000 |
259997040 |
timiss |
F |
May 8, 2024, 12:21 p.m. |
OK |
PyPy 3-64 |
TESTS |
60 |
124 |
2867200 |
|
3000 |
262158127 |
namelessgugugu |
F |
May 22, 2024, 2:37 p.m. |
OK |
Rust 2021 |
TESTS |
60 |
62 |
0 |
|
3000 |
remove filters
Back to search problems