CSES - COCI 2006/2007 #3 - Results
Submission details
Task:Patuljci
Sender:untokarila
Submission time:2019-07-24 14:15:54 +0300
Language:C++11
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.01 sdetails
#20.01 sdetails
#30.01 sdetails
#40.01 sdetails
#50.01 sdetails
#60.01 sdetails
#70.01 sdetails
#80.01 sdetails
#90.01 sdetails
#100.01 sdetails

Code

#include <iostream>

using namespace std;

int main(){
    int d[9];
    for(int i=0; i<9; i++) cin >> d[i];

    for(int b=0; b < 1<<9; b++){
        int s = 0, g = 0;
        for(int i=0; i<9; i++){
            if(b>>(1<<i)&1){
                s+= d[i];
                g++;
            }
        }
        if(s == 100 && g == 7){
            for(int i=0; i<9; i++){
                if(b>>(1<<i)&1) cout << d[i] << '\n';
            }
            break;
        }
    }
}

Test details

Test 1

Verdict:

input
1
5
6
7
10
...

correct output
1
5
6
7
19
...

user output
(empty)

Test 2

Verdict:

input
1
2
3
4
5
...

correct output
1
2
3
4
5
...

user output
(empty)

Test 3

Verdict:

input
99
98
11
12
13
...

correct output
11
12
13
14
15
...

user output
(empty)

Test 4

Verdict:

input
25
23
11
2
18
...

correct output
23
11
2
18
3
...

user output
(empty)

Test 5

Verdict:

input
15
12
22
28
18
...

correct output
15
22
28
18
3
...

user output
(empty)

Test 6

Verdict:

input
19
16
32
4
17
...

correct output
19
16
32
4
23
...

user output
(empty)

Test 7

Verdict:

input
3
37
5
36
6
...

correct output
3
37
5
6
19
...

user output
(empty)

Test 8

Verdict:

input
13
17
6
10
19
...

correct output
13
17
6
19
8
...

user output
(empty)

Test 9

Verdict:

input
19
15
4
9
16
...

correct output
19
4
9
16
33
...

user output
(empty)

Test 10

Verdict:

input
32
14
18
8
38
...

correct output
32
8
38
1
2
...

user output
(empty)