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 |
687
|
Codeforces Round 360 (Div. 1) |
FINISHED |
False |
7200 |
270392104 |
June 29, 2016, 5:05 p.m. |
Problems
B"Pari wants to buy an expensive chocolate from Arya. She has n coins, the value of the i-th coin is ci. The price of the chocolate is k, so Pari will take a subset of her coins with sum equal to k and give it to Arya. Looking at her coins, a question came to her mind: after giving the coins to Arya, what values does Arya can make with them? She is jealous and she doesn't want Arya to make a lot of values. So she wants to know all the values x, such that Arya will be able to make x using some subset of coins with the sum k. Formally, Pari wants to know the values x such that there exists a subset of coins with the sum k such that some subset of this subset has the sum x, i.e. there is exists some way to pay for the chocolate, such that Arya will be able to make the sum x using these coins. The first line contains two integers n and k (1 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89n, xe2 x80 x89k xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89 xe2 x80 x89500) -- the number of coins and the price of the chocolate, respectively. Next line will contain n integers c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89500) -- the values of Pari's coins. It's guaranteed that one can make value k using these coins. First line of the output must contain a single integer q -- the number of suitable values x. Then print q integers in ascending order -- the values that Arya can make for some subset of coins of Pari that pays for the chocolate."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
18794043 |
Gassa |
C |
June 29, 2016, 5:32 p.m. |
OK |
D |
TESTS |
64 |
342 |
4198400 |
|
2000 |
26310676 |
GreymaneSilverfang |
C |
April 12, 2017, 4:23 a.m. |
OK |
FPC |
TESTS |
64 |
155 |
1843200 |
|
2000 |
19611958 |
WalkingDeade |
C |
Aug. 4, 2016, 8:44 a.m. |
OK |
FPC |
TESTS |
64 |
280 |
307200 |
|
2000 |
21569732 |
s34vv1nd |
C |
Oct. 18, 2016, 2:23 p.m. |
OK |
FPC |
TESTS |
64 |
312 |
3788800 |
|
2000 |
18952974 |
LossABike |
C |
July 7, 2016, 2:06 p.m. |
OK |
FPC |
TESTS |
64 |
342 |
129843200 |
|
2000 |
19883812 |
lkmcfj |
C |
Aug. 15, 2016, 8:52 a.m. |
OK |
FPC |
TESTS |
64 |
421 |
127590400 |
|
2000 |
32040201 |
KagamiharaNadeshiko |
C |
Nov. 4, 2017, 1:47 a.m. |
OK |
FPC |
TESTS |
64 |
421 |
130252800 |
|
2000 |
19883847 |
lkmcfj |
C |
Aug. 15, 2016, 8:53 a.m. |
OK |
FPC |
TESTS |
64 |
436 |
127590400 |
|
2000 |
32355394 |
AsahiKasugano |
C |
Nov. 16, 2017, 12:51 p.m. |
OK |
FPC |
TESTS |
64 |
451 |
130252800 |
|
2000 |
20671187 |
0lkeh |
C |
Sept. 17, 2016, 1:48 a.m. |
OK |
FPC |
TESTS |
64 |
748 |
125952000 |
|
2000 |
33082068 |
HsOH |
C |
Dec. 10, 2017, 4:17 p.m. |
OK |
FPC |
TESTS |
64 |
826 |
2150400 |
|
2000 |
21756092 |
rainboy |
C |
Oct. 24, 2016, 5:45 p.m. |
OK |
GNU C |
TESTS |
64 |
93 |
921600 |
|
2000 |
19660948 |
vjudge4 |
C |
Aug. 6, 2016, 2:39 a.m. |
OK |
GNU C |
TESTS |
64 |
109 |
5836800 |
|
2000 |
18813025 |
dragonslayerintraining |
C |
June 29, 2016, 11:25 p.m. |
OK |
GNU C |
TESTS |
64 |
156 |
1024000 |
|
2000 |
21755570 |
rainboy |
C |
Oct. 24, 2016, 5:21 p.m. |
OK |
GNU C |
TESTS |
64 |
280 |
125747200 |
|
2000 |
18817252 |
chentong |
C |
June 30, 2016, 5:49 a.m. |
OK |
GNU C++ |
TESTS |
64 |
15 |
0 |
|
2000 |
18794484 |
LoneFox |
C |
June 29, 2016, 5:34 p.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
0 |
|
2000 |
34659011 |
yasugongshang |
C |
Jan. 29, 2018, 11:21 a.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
2150400 |
|
2000 |
25140491 |
zghh |
C |
March 2, 2017, 5:35 a.m. |
OK |
GNU C++ |
TESTS |
64 |
30 |
2150400 |
|
2000 |
27318016 |
Scut82 |
C |
May 24, 2017, 10:11 a.m. |
OK |
GNU C++ |
TESTS |
64 |
31 |
0 |
|
2000 |
20400312 |
XC_KiwiBerry |
C |
Sept. 5, 2016, 1:03 p.m. |
OK |
GNU C++ |
TESTS |
64 |
31 |
0 |
|
2000 |
19471283 |
coco0115401 |
C |
July 29, 2016, 3:12 a.m. |
OK |
GNU C++ |
TESTS |
64 |
31 |
0 |
|
2000 |
19272391 |
dragon007 |
C |
July 20, 2016, 6:57 a.m. |
OK |
GNU C++ |
TESTS |
64 |
31 |
0 |
|
2000 |
18894457 |
SanSiroWaltz |
C |
July 5, 2016, 6:55 a.m. |
OK |
GNU C++ |
TESTS |
64 |
31 |
0 |
|
2000 |
18825614 |
maopao |
C |
June 30, 2016, 2:26 p.m. |
OK |
GNU C++ |
TESTS |
64 |
31 |
0 |
|
2000 |
18841851 |
HYDROXIDE |
C |
July 1, 2016, 2:22 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
15 |
0 |
|
2000 |
18799283 |
Superty |
C |
June 29, 2016, 5:59 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
15 |
0 |
|
2000 |
18796676 |
Tinsane |
C |
June 29, 2016, 5:44 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
15 |
0 |
|
2000 |
18798635 |
akim |
C |
June 29, 2016, 5:55 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
15 |
512000 |
|
2000 |
34324316 |
brightsompong |
C |
Jan. 19, 2018, 4:12 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
15 |
2252800 |
|
2000 |
22692456 |
qsqx |
C |
Dec. 4, 2016, 9:14 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
2000 |
18892033 |
r_clover |
C |
July 5, 2016, 2:54 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
2000 |
18820393 |
data_h |
C |
June 30, 2016, 9:09 a.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
2000 |
18804709 |
johnjq |
C |
June 29, 2016, 6:39 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
2000 |
18803799 |
Velter |
C |
June 29, 2016, 6:32 p.m. |
OK |
GNU C++11 |
TESTS |
64 |
30 |
0 |
|
2000 |
36222862 |
Zeus726 |
C |
March 12, 2018, 12:04 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
15 |
18841600 |
|
2000 |
27324444 |
bharathg |
C |
May 24, 2017, 5:52 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
30 |
0 |
|
2000 |
26199154 |
_Saitama_ |
C |
April 7, 2017, 4:43 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
30 |
1945600 |
|
2000 |
25542794 |
A.BATJARGAL |
C |
March 16, 2017, 8:50 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
30 |
1945600 |
|
2000 |
25420247 |
dionysios |
C |
March 11, 2017, 10:35 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
30 |
1945600 |
|
2000 |
63937008 |
Amireza |
C |
Oct. 31, 2019, 4:11 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
31 |
0 |
|
2000 |
51087554 |
TEAs |
C |
March 9, 2019, 1:36 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
31 |
0 |
|
2000 |
49461682 |
zvv |
C |
Feb. 4, 2019, 1:18 p.m. |
OK |
GNU C++14 |
TESTS |
64 |
31 |
0 |
|
2000 |
31142737 |
Random_Place |
C |
Oct. 8, 2017, 11:44 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
31 |
0 |
|
2000 |
20377013 |
Artem_Lyutenkov |
C |
Sept. 4, 2016, 7:49 a.m. |
OK |
GNU C++14 |
TESTS |
64 |
31 |
0 |
|
2000 |
68469737 |
wery0 |
C |
Jan. 10, 2020, 12:04 a.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
0 |
|
2000 |
58779396 |
mihaild |
C |
Aug. 13, 2019, 6:50 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
0 |
|
2000 |
50065632 |
blast |
C |
Feb. 17, 2019, 2:39 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
0 |
|
2000 |
49635477 |
vjudge2 |
C |
Feb. 8, 2019, 6:28 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
307200 |
|
2000 |
48582835 |
johnjq |
C |
Jan. 19, 2019, 5:34 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
307200 |
|
2000 |
49466022 |
AliShahali1382 |
C |
Feb. 4, 2019, 3:06 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
409600 |
|
2000 |
49465806 |
AliShahali1382 |
C |
Feb. 4, 2019, 3 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
409600 |
|
2000 |
50032469 |
NelsonGomesNeto |
C |
Feb. 16, 2019, 6:59 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
31 |
2048000 |
|
2000 |
65082268 |
jaaguptamme |
C |
Nov. 15, 2019, 4:57 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
46 |
0 |
|
2000 |
51940631 |
luciocf |
C |
March 28, 2019, 2:19 p.m. |
OK |
GNU C++17 |
TESTS |
64 |
46 |
0 |
|
2000 |
46300657 |
opqq |
C |
Nov. 28, 2018, 7:29 a.m. |
OK |
Go |
TESTS |
64 |
405 |
32051200 |
|
2000 |
18849503 |
kensens |
C |
July 2, 2016, 5:31 a.m. |
OK |
Java 7 |
TESTS |
64 |
280 |
0 |
|
2000 |
19567538 |
lehar |
C |
Aug. 1, 2016, 7:48 p.m. |
OK |
Java 7 |
TESTS |
64 |
529 |
0 |
|
2000 |
19444812 |
kshitij.jain.ece13 |
C |
July 27, 2016, 3:42 p.m. |
OK |
Java 7 |
TESTS |
64 |
592 |
0 |
|
2000 |
18864218 |
fillets |
C |
July 3, 2016, 7:27 a.m. |
OK |
Java 7 |
TESTS |
64 |
732 |
0 |
|
2000 |
18839079 |
marcose18 |
C |
July 1, 2016, 10:59 a.m. |
OK |
Java 7 |
TESTS |
64 |
779 |
0 |
|
2000 |
18811407 |
MedoN11 |
C |
June 29, 2016, 9:15 p.m. |
OK |
Java 7 |
TESTS |
64 |
920 |
0 |
|
2000 |
18844913 |
mkirsche |
C |
July 1, 2016, 6:35 p.m. |
OK |
Java 8 |
TESTS |
64 |
155 |
0 |
|
2000 |
18844841 |
mkirsche |
C |
July 1, 2016, 6:28 p.m. |
OK |
Java 8 |
TESTS |
64 |
155 |
0 |
|
2000 |
18844756 |
mkirsche |
C |
July 1, 2016, 6:18 p.m. |
OK |
Java 8 |
TESTS |
64 |
170 |
0 |
|
2000 |
18806312 |
AndreySiunov |
C |
June 29, 2016, 6:50 p.m. |
OK |
Java 8 |
TESTS |
64 |
171 |
0 |
|
2000 |
45266670 |
Srinivasa_Ramanujan |
C |
Nov. 4, 2018, 6:18 a.m. |
OK |
Java 8 |
TESTS |
64 |
202 |
0 |
|
2000 |
19657433 |
carvajal |
C |
Aug. 5, 2016, 7:06 p.m. |
OK |
Java 8 |
TESTS |
64 |
217 |
20480000 |
|
2000 |
19657460 |
carvajal |
C |
Aug. 5, 2016, 7:08 p.m. |
OK |
Java 8 |
TESTS |
64 |
249 |
20480000 |
|
2000 |
18792976 |
ilyakor |
C |
June 29, 2016, 5:27 p.m. |
OK |
Java 8 |
TESTS |
64 |
264 |
0 |
|
2000 |
18981901 |
wizardleen |
C |
July 9, 2016, 8:31 a.m. |
OK |
Java 8 |
TESTS |
64 |
280 |
41164800 |
|
2000 |
19177232 |
kafy83 |
C |
July 16, 2016, 5:06 p.m. |
OK |
Java 8 |
TESTS |
64 |
358 |
0 |
|
2000 |
18802771 |
azukun |
C |
June 29, 2016, 6:24 p.m. |
OK |
MS C# |
TESTS |
64 |
93 |
5529600 |
|
2000 |
18808082 |
haitao |
C |
June 29, 2016, 7:02 p.m. |
OK |
MS C# |
TESTS |
64 |
187 |
409600 |
|
2000 |
22503144 |
og.kostya |
C |
Nov. 26, 2016, 7:42 a.m. |
OK |
MS C# |
TESTS |
64 |
420 |
4505600 |
|
2000 |
18823042 |
azukun |
C |
June 30, 2016, 11:58 a.m. |
OK |
MS C# |
TESTS |
64 |
529 |
6041600 |
|
2000 |
18991348 |
jsells |
C |
July 9, 2016, 8:20 p.m. |
OK |
MS C# |
TESTS |
64 |
811 |
129331200 |
|
2000 |
18812783 |
Carups |
C |
June 29, 2016, 11:02 p.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
716800 |
|
2000 |
18838870 |
DmitriyH |
C |
July 1, 2016, 10:46 a.m. |
OK |
MS C++ |
TESTS |
64 |
31 |
16281600 |
|
2000 |
18790412 |
LLI_E_P_JI_O_K |
C |
June 29, 2016, 5:18 p.m. |
OK |
MS C++ |
TESTS |
64 |
61 |
204800 |
|
2000 |
19461743 |
Awata |
C |
July 28, 2016, 12:58 p.m. |
OK |
MS C++ |
TESTS |
64 |
78 |
1024000 |
|
2000 |
18910314 |
lastseed |
C |
July 6, 2016, 2:53 a.m. |
OK |
MS C++ |
TESTS |
64 |
78 |
1126400 |
|
2000 |
57304709 |
vjudge5 |
C |
July 19, 2019, 2:51 a.m. |
OK |
MS C++ |
TESTS |
64 |
78 |
1228800 |
|
2000 |
28652856 |
vjudge3 |
C |
July 18, 2017, 2:35 a.m. |
OK |
MS C++ |
TESTS |
64 |
78 |
3072000 |
|
2000 |
23247851 |
Khazhak |
C |
Dec. 23, 2016, 1:04 p.m. |
OK |
MS C++ |
TESTS |
64 |
78 |
3072000 |
|
2000 |
19471402 |
kasemyassine |
C |
July 29, 2016, 3:25 a.m. |
OK |
MS C++ |
TESTS |
64 |
93 |
1024000 |
|
2000 |
59778813 |
vjudge5 |
C |
Aug. 31, 2019, 1:45 a.m. |
OK |
MS C++ |
TESTS |
64 |
109 |
1024000 |
|
2000 |
58683118 |
CtrlAlt |
C |
Aug. 12, 2019, 8:12 p.m. |
OK |
MS C++ 2017 |
TESTS |
64 |
46 |
0 |
|
2000 |
19757843 |
vjudge5 |
C |
Aug. 10, 2016, 3:43 a.m. |
OK |
PyPy 3 |
TESTS |
64 |
171 |
28569600 |
|
2000 |
55580232 |
Aidos |
C |
June 15, 2019, 6:10 a.m. |
OK |
PyPy 3 |
TESTS |
64 |
1014 |
1945600 |
|
2000 |
55580214 |
Aidos |
C |
June 15, 2019, 6:09 a.m. |
OK |
PyPy 3 |
TESTS |
64 |
1450 |
2048000 |
|
2000 |
55579989 |
Aidos |
C |
June 15, 2019, 5:58 a.m. |
OK |
PyPy 3 |
TESTS |
64 |
1513 |
3788800 |
|
2000 |
43275964 |
Stephan |
C |
Sept. 22, 2018, 10:51 p.m. |
OK |
PyPy 3 |
TESTS |
64 |
1996 |
3891200 |
|
2000 |
18989238 |
chi-shde |
C |
July 9, 2016, 4:42 p.m. |
OK |
Python 2 |
TESTS |
64 |
124 |
0 |
|
2000 |
18796801 |
nwi |
C |
June 29, 2016, 5:45 p.m. |
OK |
Python 2 |
TESTS |
64 |
124 |
0 |
|
2000 |
23278747 |
swetank |
C |
Dec. 24, 2016, 7:56 p.m. |
OK |
Python 2 |
TESTS |
64 |
140 |
4608000 |
|
2000 |
44117202 |
vjudge5 |
C |
Oct. 11, 2018, 2:50 p.m. |
OK |
Python 3 |
TESTS |
64 |
405 |
12800000 |
|
2000 |
20096275 |
jackowitzd2 |
C |
Aug. 24, 2016, 1:13 a.m. |
OK |
Python 3 |
TESTS |
64 |
530 |
4915200 |
|
2000 |
42136637 |
Mk_Python_v1 |
C |
Aug. 27, 2018, 12:44 a.m. |
OK |
Python 3 |
TESTS |
64 |
561 |
102400 |
|
2000 |
19272859 |
crazypursuer |
C |
July 20, 2016, 7:13 a.m. |
OK |
Scala |
TESTS |
64 |
654 |
0 |
|
2000 |
19272820 |
crazypursuer |
C |
July 20, 2016, 7:12 a.m. |
OK |
Scala |
TESTS |
64 |
670 |
0 |
|
2000 |
remove filters
Back to search problems