Task: | Kolikot |
Sender: | siirikuoppala |
Submission time: | 2016-07-28 14:53:57 +0300 |
Language: | C++ |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.05 s | details |
#2 | ACCEPTED | 0.05 s | details |
#3 | ACCEPTED | 0.05 s | details |
#4 | ACCEPTED | 0.06 s | details |
#5 | ACCEPTED | 0.06 s | details |
#6 | WRONG ANSWER | 0.06 s | details |
#7 | WRONG ANSWER | 0.06 s | details |
#8 | WRONG ANSWER | 0.07 s | details |
#9 | WRONG ANSWER | 0.06 s | details |
#10 | ACCEPTED | 0.06 s | details |
Code
#include <iostream> using namespace std; int t[101010]; int n, x; int main(){ cin >> n >> x; t[0]=1; for(int i=0; i<n; ++i){ int c; cin >> c; for(int i=c; i<=x; ++i){ t[i]+=t[i-c]; } } cout << t[x]; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
10 100 4 10 1 6 8 9 3 7 2 5 |
correct output |
---|
6292069 |
user output |
---|
6292069 |
Test 2
Verdict: ACCEPTED
input |
---|
10 100 15 13 6 1 19 2 12 7 17 11 |
correct output |
---|
137264 |
user output |
---|
137264 |
Test 3
Verdict: ACCEPTED
input |
---|
10 100 4 6 27 5 24 8 29 7 17 12 |
correct output |
---|
9127 |
user output |
---|
9127 |
Test 4
Verdict: ACCEPTED
input |
---|
10 100 27 5 36 34 4 28 29 18 1 26 |
correct output |
---|
4245 |
user output |
---|
4245 |
Test 5
Verdict: ACCEPTED
input |
---|
10 100 1 13 34 38 8 32 7 47 25 15 |
correct output |
---|
2448 |
user output |
---|
2448 |
Test 6
Verdict: WRONG ANSWER
input |
---|
100 100000 157 42 20 92 161 45 78 193 121... |
correct output |
---|
965218376 |
user output |
---|
1276963044 |
Test 7
Verdict: WRONG ANSWER
input |
---|
100 100000 128 91 277 255 36 274 15 110 4... |
correct output |
---|
61380312 |
user output |
---|
509898131 |
Test 8
Verdict: WRONG ANSWER
input |
---|
100 100000 975 777 370 188 787 808 879 79... |
correct output |
---|
44790529 |
user output |
---|
726076023 |
Test 9
Verdict: WRONG ANSWER
input |
---|
100 100000 2783 2426 2774 4245 1497 2915 ... |
correct output |
---|
269131525 |
user output |
---|
1637791731 |
Test 10
Verdict: ACCEPTED
input |
---|
100 100000 12852 43492 55488 16404 72089 ... |
correct output |
---|
1128389 |
user output |
---|
1128389 |