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"In Berland, n different types of banknotes are used. Banknotes of the i -th type have denomination 10^{a_i} burles (burles are the currency used in Berland); the denomination of banknotes of the first type is exactly 1 . Let's denote f(s) as the minimum number of banknotes required to represent exactly s burles. For example, if the denominations of banknotes used in Berland are 1 , 10 and 100 , then f(59) = 14 : 9 banknotes with denomination of 1 burle and 5 banknotes with denomination of 10 burles can be used to represent exactly 9 cdot 1 + 5 cdot 10 = 59 burles, and there's no way to do it with fewer banknotes. For a given integer k , find the minimum positive number of burles s that cannot be represented with k or fewer banknotes (that is, f(s) > k ). The first line contains a single integer t ( 1 <= t <= 10^4 ) -- number of test cases. The first line of each test case contains two integers n and k ( 1 <= n <= 10; 1 <= k <= 10^9 ). The next line contains n integers a_1, a_2, ... , a_n ( 0 = a_1 < a_2 < ... < a_n <= 9 ). For each test case, print one integer -- the minimum positive number of burles s that cannot be represented with k or fewer banknotes. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
133529617 |
ruban |
C |
Oct. 29, 2021, 5:42 p.m. |
OK |
Delphi |
TESTS |
7 |
77 |
39833600 |
|
|
133514750 |
Mrgglock |
C |
Oct. 29, 2021, 4:20 p.m. |
OK |
GNU C11 |
TESTS |
7 |
15 |
3686400 |
|
|
133532038 |
itami-o-shire |
C |
Oct. 29, 2021, 6:04 p.m. |
OK |
GNU C11 |
TESTS |
7 |
30 |
3686400 |
|
|
133512426 |
binary_sunrise |
C |
Oct. 29, 2021, 4:13 p.m. |
OK |
GNU C11 |
TESTS |
7 |
31 |
3686400 |
|
|
133558371 |
stanlyb24 |
C |
Oct. 30, 2021, 3:12 a.m. |
OK |
GNU C11 |
TESTS |
7 |
62 |
3686400 |
|
|
133520146 |
milan_s1 |
C |
Oct. 29, 2021, 4:33 p.m. |
OK |
GNU C11 |
TESTS |
7 |
62 |
3686400 |
|
|
133518736 |
rainboy |
C |
Oct. 29, 2021, 4:30 p.m. |
OK |
GNU C11 |
TESTS |
7 |
78 |
3686400 |
|
|
133533345 |
hritikritesh |
C |
Oct. 29, 2021, 6:17 p.m. |
OK |
GNU C11 |
TESTS |
7 |
78 |
3686400 |
|
|
133554706 |
xty_ |
C |
Oct. 30, 2021, 1:51 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
1024000 |
|
|
133554216 |
luohanzhao1127 |
C |
Oct. 30, 2021, 1:39 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
1024000 |
|
|
133518215 |
Nimiciaap |
C |
Oct. 29, 2021, 4:29 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
1228800 |
|
|
133530621 |
SSJG_KakAroT |
C |
Oct. 29, 2021, 5:51 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
1228800 |
|
|
133552475 |
ExplodingKonjac |
C |
Oct. 30, 2021, 12:52 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
15 |
13721600 |
|
|
133535871 |
baghelshaurya |
C |
Oct. 29, 2021, 6:46 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
30 |
1024000 |
|
|
133561612 |
augg1e |
C |
Oct. 30, 2021, 4:15 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
30 |
1024000 |
|
|
133559490 |
Horcrux_63 |
C |
Oct. 30, 2021, 3:35 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
30 |
1228800 |
|
|
133521218 |
coderHK |
C |
Oct. 29, 2021, 4:37 p.m. |
OK |
GNU C++14 |
TESTS |
7 |
30 |
1228800 |
|
|
133565491 |
maomaotu |
C |
Oct. 30, 2021, 5:22 a.m. |
OK |
GNU C++14 |
TESTS |
7 |
31 |
1024000 |
|
|
133520156 |
nilikuo |
C |
Oct. 29, 2021, 4:33 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
1024000 |
|
|
133543138 |
dey44and |
C |
Oct. 29, 2021, 8:30 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
1024000 |
|
|
133520440 |
BUD-CJJ |
C |
Oct. 29, 2021, 4:34 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
1024000 |
|
|
133526054 |
Smit_prajapati01 |
C |
Oct. 29, 2021, 5:11 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
1228800 |
|
|
133520880 |
Mahm2od |
C |
Oct. 29, 2021, 4:36 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
1228800 |
|
|
133554139 |
WaAccept |
C |
Oct. 30, 2021, 1:37 a.m. |
OK |
GNU C++17 |
TESTS |
7 |
15 |
2764800 |
|
|
133513849 |
BackToSquare1 |
C |
Oct. 29, 2021, 4:17 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
30 |
1024000 |
|
|
133518706 |
hrushi6161 |
C |
Oct. 29, 2021, 4:30 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
30 |
1024000 |
|
|
133523866 |
amanmishra_20 |
C |
Oct. 29, 2021, 4:53 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
30 |
1024000 |
|
|
133513021 |
Vladvd |
C |
Oct. 29, 2021, 4:15 p.m. |
OK |
GNU C++17 |
TESTS |
7 |
30 |
1024000 |
|
|
133564863 |
bhawesh7 |
C |
Oct. 30, 2021, 5:13 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133564796 |
CodyTheWolf |
C |
Oct. 30, 2021, 5:12 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133556254 |
Ameliorate |
C |
Oct. 30, 2021, 2:27 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133552656 |
keenlf |
C |
Oct. 30, 2021, 12:57 a.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133545377 |
ma6755501 |
C |
Oct. 29, 2021, 9:14 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133540753 |
nohaxjustsoflo |
C |
Oct. 29, 2021, 7:54 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133536669 |
Golden |
C |
Oct. 29, 2021, 6:57 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133530692 |
Kryptonix |
C |
Oct. 29, 2021, 5:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133528636 |
PhaiCoGiaiQuocGia |
C |
Oct. 29, 2021, 5:35 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133526526 |
Capitan |
C |
Oct. 29, 2021, 5:15 p.m. |
OK |
GNU C++17 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133530764 |
fenyman |
C |
Oct. 29, 2021, 5:52 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133530682 |
AGRU |
C |
Oct. 29, 2021, 5:51 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133527938 |
Muhammedalajam |
C |
Oct. 29, 2021, 5:29 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133537997 |
Cleanblue |
C |
Oct. 29, 2021, 7:14 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133539184 |
morty |
C |
Oct. 29, 2021, 7:31 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133545373 |
SATISH_S |
C |
Oct. 29, 2021, 9:14 p.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133552964 |
1zerp |
C |
Oct. 30, 2021, 1:06 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133554709 |
xu_z |
C |
Oct. 30, 2021, 1:51 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133559396 |
hasan_tawsif |
C |
Oct. 30, 2021, 3:33 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133565102 |
yashagg1329 |
C |
Oct. 30, 2021, 5:16 a.m. |
OK |
GNU C++20 (64) |
TESTS |
7 |
15 |
1228800 |
|
|
133545093 |
justcode_fk |
C |
Oct. 29, 2021, 9:08 p.m. |
OK |
Go |
TESTS |
7 |
77 |
8192000 |
|
|
133521706 |
glebsamsonov |
C |
Oct. 29, 2021, 4:40 p.m. |
OK |
Go |
TESTS |
7 |
124 |
8192000 |
|
|
133532229 |
bittubittu |
C |
Oct. 29, 2021, 6:06 p.m. |
OK |
Java 11 |
TESTS |
7 |
187 |
24576000 |
|
|
133516103 |
sumit.dhull610 |
C |
Oct. 29, 2021, 4:23 p.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
24576000 |
|
|
133564550 |
the_unseen |
C |
Oct. 30, 2021, 5:09 a.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
24678400 |
|
|
133558188 |
naman5811 |
C |
Oct. 30, 2021, 3:08 a.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
24678400 |
|
|
133530884 |
Tykonan |
C |
Oct. 29, 2021, 5:53 p.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
24678400 |
|
|
133514333 |
dinosparton_013 |
C |
Oct. 29, 2021, 4:18 p.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
24678400 |
|
|
133511876 |
RockStar_14 |
C |
Oct. 29, 2021, 4:12 p.m. |
OK |
Java 11 |
TESTS |
7 |
202 |
24678400 |
|
|
133516110 |
Omar_Tarek |
C |
Oct. 29, 2021, 4:23 p.m. |
OK |
Java 11 |
TESTS |
7 |
217 |
24678400 |
|
|
133546075 |
_Body |
C |
Oct. 29, 2021, 9:32 p.m. |
OK |
Java 11 |
TESTS |
7 |
217 |
24780800 |
|
|
133516567 |
dhruvil_8803 |
C |
Oct. 29, 2021, 4:25 p.m. |
OK |
Java 11 |
TESTS |
7 |
218 |
24576000 |
|
|
133519825 |
yaminote |
C |
Oct. 29, 2021, 4:33 p.m. |
OK |
Java 8 |
TESTS |
7 |
124 |
18841600 |
|
|
133540786 |
piyush33patel |
C |
Oct. 29, 2021, 7:55 p.m. |
OK |
Java 8 |
TESTS |
7 |
124 |
18944000 |
|
|
133535644 |
athu18 |
C |
Oct. 29, 2021, 6:44 p.m. |
OK |
Java 8 |
TESTS |
7 |
124 |
19251200 |
|
|
133518873 |
TCchen |
C |
Oct. 29, 2021, 4:30 p.m. |
OK |
Java 8 |
TESTS |
7 |
124 |
19763200 |
|
|
133544223 |
smahajan54842 |
C |
Oct. 29, 2021, 8:50 p.m. |
OK |
Java 8 |
TESTS |
7 |
139 |
18841600 |
|
|
133522920 |
Embrion_top |
C |
Oct. 29, 2021, 4:47 p.m. |
OK |
Java 8 |
TESTS |
7 |
139 |
18944000 |
|
|
133522103 |
RonWonWon |
C |
Oct. 29, 2021, 4:42 p.m. |
OK |
Java 8 |
TESTS |
7 |
140 |
19046400 |
|
|
133522774 |
Embrion_top |
C |
Oct. 29, 2021, 4:46 p.m. |
OK |
Java 8 |
TESTS |
7 |
155 |
18944000 |
|
|
133521879 |
amit_roy |
C |
Oct. 29, 2021, 4:41 p.m. |
OK |
Java 8 |
TESTS |
7 |
170 |
18944000 |
|
|
133535400 |
ruchir28 |
C |
Oct. 29, 2021, 6:41 p.m. |
OK |
Java 8 |
TESTS |
7 |
171 |
18944000 |
|
|
133563079 |
Koo_Pung-Kei |
C |
Oct. 30, 2021, 4:40 a.m. |
OK |
Kotlin 1.5 |
TESTS |
7 |
390 |
25395200 |
|
|
133518983 |
Jerrylyc |
C |
Oct. 29, 2021, 4:31 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
46 |
1126400 |
|
|
133518616 |
202003021019 |
C |
Oct. 29, 2021, 4:30 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
46 |
1126400 |
|
|
133531665 |
jonitox2 |
C |
Oct. 29, 2021, 6 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
62 |
1126400 |
|
|
133522847 |
D9RS |
C |
Oct. 29, 2021, 4:47 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
78 |
1126400 |
|
|
133550620 |
diajutcum |
C |
Oct. 29, 2021, 11:52 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
93 |
1126400 |
|
|
133550583 |
diajutcum |
C |
Oct. 29, 2021, 11:51 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
93 |
1126400 |
|
|
133518199 |
howllow |
C |
Oct. 29, 2021, 4:29 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
108 |
1126400 |
|
|
133517629 |
Yhatman |
C |
Oct. 29, 2021, 4:27 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
108 |
1126400 |
|
|
133524617 |
Tangerine |
C |
Oct. 29, 2021, 4:59 p.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
109 |
1126400 |
|
|
133559172 |
Agumon |
C |
Oct. 30, 2021, 3:29 a.m. |
OK |
MS C++ 2017 |
TESTS |
7 |
124 |
1126400 |
|
|
133522914 |
1_2_3_4_5_9 |
C |
Oct. 29, 2021, 4:47 p.m. |
OK |
PyPy 2 |
TESTS |
7 |
186 |
23961600 |
|
|
133560438 |
hxu10 |
C |
Oct. 30, 2021, 3:54 a.m. |
OK |
PyPy 3 |
TESTS |
7 |
140 |
23756800 |
|
|
133541908 |
Aksnov |
C |
Oct. 29, 2021, 8:12 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
155 |
23449600 |
|
|
133542091 |
Aksnov |
C |
Oct. 29, 2021, 8:15 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
171 |
23244800 |
|
|
133533301 |
erachanzZ |
C |
Oct. 29, 2021, 6:17 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
171 |
23654400 |
|
|
133533222 |
erachanzZ |
C |
Oct. 29, 2021, 6:16 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
171 |
23756800 |
|
|
133539128 |
whatshisbucket |
C |
Oct. 29, 2021, 7:30 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
186 |
23142400 |
|
|
133522084 |
Bad_day_toCode |
C |
Oct. 29, 2021, 4:42 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
186 |
25395200 |
|
|
133558390 |
puffc0rn |
C |
Oct. 30, 2021, 3:12 a.m. |
OK |
PyPy 3 |
TESTS |
7 |
186 |
89804800 |
|
|
133519306 |
akshitm16 |
C |
Oct. 29, 2021, 4:32 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
202 |
22732800 |
|
|
133516820 |
sk_loves_Ritika |
C |
Oct. 29, 2021, 4:25 p.m. |
OK |
PyPy 3 |
TESTS |
7 |
202 |
24268800 |
|
|
133536953 |
feelme |
C |
Oct. 29, 2021, 7 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
124 |
36147200 |
|
|
133536797 |
feelme |
C |
Oct. 29, 2021, 6:59 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
140 |
37068800 |
|
|
133518564 |
lazyapc |
C |
Oct. 29, 2021, 4:30 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
155 |
38092800 |
|
|
133516625 |
lazyapc |
C |
Oct. 29, 2021, 4:25 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
155 |
38092800 |
|
|
133522940 |
sarthak_bharadwaj_ |
C |
Oct. 29, 2021, 4:47 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
170 |
37171200 |
|
|
133538323 |
futurial |
C |
Oct. 29, 2021, 7:18 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
171 |
37990400 |
|
|
133538306 |
myotra |
C |
Oct. 29, 2021, 7:18 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
171 |
38195200 |
|
|
133524872 |
Skillful_Wanderer |
C |
Oct. 29, 2021, 5:01 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
171 |
38195200 |
|
|
133521267 |
Pa_sha |
C |
Oct. 29, 2021, 4:38 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
171 |
38195200 |
|
|
133520258 |
Skillful_Wanderer |
C |
Oct. 29, 2021, 4:34 p.m. |
OK |
PyPy 3-64 |
TESTS |
7 |
171 |
38195200 |
|
|
133527453 |
andrey545454 |
C |
Oct. 29, 2021, 5:24 p.m. |
OK |
Python 3 |
TESTS |
7 |
186 |
4505600 |
|
|
133540499 |
codethat_vivek |
C |
Oct. 29, 2021, 7:50 p.m. |
OK |
Python 3 |
TESTS |
7 |
202 |
4505600 |
|
|
133557828 |
Bambam_Shivam |
C |
Oct. 30, 2021, 3 a.m. |
OK |
Python 3 |
TESTS |
7 |
217 |
5529600 |
|
|
133515758 |
190030313_Meghana |
C |
Oct. 29, 2021, 4:22 p.m. |
OK |
Python 3 |
TESTS |
7 |
233 |
4505600 |
|
|
133513120 |
aka_abdol |
C |
Oct. 29, 2021, 4:15 p.m. |
OK |
Python 3 |
TESTS |
7 |
233 |
4505600 |
|
|
133521135 |
DoniRR |
C |
Oct. 29, 2021, 4:37 p.m. |
OK |
Python 3 |
TESTS |
7 |
233 |
4710400 |
|
|
133518123 |
vwxyz0 |
C |
Oct. 29, 2021, 4:29 p.m. |
OK |
Python 3 |
TESTS |
7 |
233 |
4812800 |
|
|
133515452 |
slskrish1998 |
C |
Oct. 29, 2021, 4:21 p.m. |
OK |
Python 3 |
TESTS |
7 |
249 |
4505600 |
|
|
133537255 |
mrobiul |
C |
Oct. 29, 2021, 7:04 p.m. |
OK |
Python 3 |
TESTS |
7 |
264 |
4505600 |
|
|
133527265 |
STILSIK |
C |
Oct. 29, 2021, 5:22 p.m. |
OK |
Python 3 |
TESTS |
7 |
264 |
4505600 |
|
|
133540939 |
kumalimak |
C |
Oct. 29, 2021, 7:57 p.m. |
OK |
Rust |
TESTS |
7 |
31 |
1228800 |
|
|
133526765 |
noogler |
C |
Oct. 29, 2021, 5:17 p.m. |
OK |
Rust |
TESTS |
7 |
46 |
1228800 |
|
|
remove filters
Back to search problems