CSES - HIIT Open 2019 - Results
Submission details
Task:Epic Subset
Sender:Game of Nolife
Submission time:2019-05-25 14:25:59 +0300
Language:C++
Status:READY
Result:ACCEPTED
Test results
testverdicttime
#1ACCEPTED0.02 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.03 sdetails
#4ACCEPTED0.02 sdetails
#5ACCEPTED0.03 sdetails
#6ACCEPTED0.02 sdetails
#7ACCEPTED0.03 sdetails
#8ACCEPTED0.02 sdetails
#9ACCEPTED0.02 sdetails
#10ACCEPTED0.01 sdetails
#11ACCEPTED0.03 sdetails
#12ACCEPTED0.03 sdetails
#13ACCEPTED0.02 sdetails
#14ACCEPTED0.03 sdetails
#15ACCEPTED0.02 sdetails
#16ACCEPTED0.03 sdetails
#17ACCEPTED0.03 sdetails
#18ACCEPTED0.03 sdetails
#19ACCEPTED0.02 sdetails
#20ACCEPTED0.02 sdetails
#21ACCEPTED0.01 sdetails
#22ACCEPTED0.03 sdetails
#23ACCEPTED0.02 sdetails
#24ACCEPTED0.02 sdetails
#25ACCEPTED0.02 sdetails
#26ACCEPTED0.02 sdetails
#27ACCEPTED0.01 sdetails
#28ACCEPTED0.02 sdetails
#29ACCEPTED0.02 sdetails
#30ACCEPTED0.03 sdetails
#31ACCEPTED0.01 sdetails
#32ACCEPTED0.03 sdetails
#33ACCEPTED0.03 sdetails
#34ACCEPTED0.02 sdetails
#35ACCEPTED0.01 sdetails
#36ACCEPTED0.02 sdetails
#37ACCEPTED0.03 sdetails
#38ACCEPTED0.02 sdetails
#39ACCEPTED0.01 sdetails
#40ACCEPTED0.01 sdetails
#41ACCEPTED0.02 sdetails
#42ACCEPTED0.01 sdetails
#43ACCEPTED0.02 sdetails
#44ACCEPTED0.01 sdetails
#45ACCEPTED0.02 sdetails
#46ACCEPTED0.04 sdetails
#47ACCEPTED0.02 sdetails
#48ACCEPTED0.02 sdetails
#49ACCEPTED0.02 sdetails
#50ACCEPTED0.02 sdetails
#51ACCEPTED0.04 sdetails
#52ACCEPTED0.03 sdetails
#53ACCEPTED0.03 sdetails
#54ACCEPTED0.02 sdetails
#55ACCEPTED0.01 sdetails
#56ACCEPTED0.03 sdetails
#57ACCEPTED0.02 sdetails
#58ACCEPTED0.03 sdetails
#59ACCEPTED0.03 sdetails
#60ACCEPTED0.03 sdetails
#61ACCEPTED0.02 sdetails
#62ACCEPTED0.03 sdetails
#63ACCEPTED0.02 sdetails
#64ACCEPTED0.03 sdetails
#65ACCEPTED0.01 sdetails
#66ACCEPTED0.01 sdetails
#67ACCEPTED0.02 sdetails
#68ACCEPTED0.03 sdetails
#69ACCEPTED0.01 sdetails
#70ACCEPTED0.01 sdetails
#71ACCEPTED0.01 sdetails
#72ACCEPTED0.03 sdetails
#73ACCEPTED0.01 sdetails
#74ACCEPTED0.02 sdetails
#75ACCEPTED0.02 sdetails
#76ACCEPTED0.03 sdetails
#77ACCEPTED0.02 sdetails
#78ACCEPTED0.03 sdetails
#79ACCEPTED0.03 sdetails
#80ACCEPTED0.03 sdetails

Code

#include <bits/stdc++.h>
#define F first
#define S second
#define X real()
#define Y imag()
using namespace std;
typedef long long ll;
typedef long double ld;

/*
vector<int> best[81];
vector<int> t;
int h[188];

void go(int x){
    if (t.size()>best[x-1].size()){
        best[x-1]=t;
        cerr<<"best "<<x-1<<" "<<t.size()<<endl;
    }
    if (x==81){
        return;
    }
    go(x+1);
    for (int y:t){
        if (h[x+y]){
            return;
        }
    }
    for (int y:t){
        h[x+y]=1;
    }
    t.push_back(x);
    go(x+1);
    t.pop_back();
    for (int y:t){
        h[x+y]=0;
    }
}*/



int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    /*
    t.push_back(1);
    go(2);
    for (int i=1;i<=80;i++){
        cout<<"ans["<<i<<"] = {";
        for (int j=0;j<(int)best[i].size();j++){
            cout<<best[i][j];
            if (j+1<(int)best[i].size()){
                cout<<", ";
            }
        }
        cout<<"};"<<endl;
    }*/
    vector<vector<int>> ans(81);
ans[1] = {1};
ans[2] = {1, 2};
ans[3] = {1, 2, 3};
ans[4] = {1, 3, 4};
ans[5] = {1, 3, 4, 5};
ans[6] = {1, 4, 5, 6};
ans[7] = {1, 5, 6, 7};
ans[8] = {1, 4, 6, 7, 8};
ans[9] = {1, 5, 7, 8, 9};
ans[10] = {1, 6, 8, 9, 10};
ans[11] = {1, 7, 9, 10, 11};
ans[12] = {1, 8, 10, 11, 12};
ans[13] = {1, 6, 9, 11, 12, 13};
ans[14] = {1, 7, 10, 12, 13, 14};
ans[15] = {1, 8, 11, 13, 14, 15};
ans[16] = {1, 9, 12, 14, 15, 16};
ans[17] = {1, 10, 13, 15, 16, 17};
ans[18] = {1, 11, 14, 16, 17, 18};
ans[19] = {1, 6, 11, 15, 17, 18, 19};
ans[20] = {1, 6, 12, 16, 18, 19, 20};
ans[21] = {1, 9, 14, 17, 19, 20, 21};
ans[22] = {1, 10, 15, 18, 20, 21, 22};
ans[23] = {1, 11, 16, 19, 21, 22, 23};
ans[24] = {1, 12, 17, 20, 22, 23, 24};
ans[25] = {1, 6, 11, 17, 21, 23, 24, 25};
ans[26] = {1, 6, 11, 18, 22, 24, 25, 26};
ans[27] = {1, 7, 13, 18, 23, 25, 26, 27};
ans[28] = {1, 8, 15, 20, 24, 25, 26, 28};
ans[29] = {1, 11, 16, 21, 25, 27, 28, 29};
ans[30] = {1, 12, 16, 20, 23, 28, 29, 30};
ans[31] = {1, 12, 17, 23, 27, 29, 30, 31};
ans[32] = {1, 13, 14, 22, 25, 28, 30, 32};
ans[33] = {1, 15, 20, 25, 29, 31, 32, 33};
ans[34] = {1, 16, 21, 26, 30, 32, 33, 34};
ans[35] = {1, 6, 11, 20, 27, 31, 33, 34, 35};
ans[36] = {1, 7, 10, 13, 17, 21, 34, 35, 36};
ans[37] = {1, 8, 15, 24, 29, 33, 34, 35, 37};
ans[38] = {1, 11, 15, 19, 26, 32, 35, 37, 38};
ans[39] = {1, 11, 15, 19, 26, 32, 35, 37, 38};
ans[40] = {1, 14, 15, 24, 29, 32, 34, 36, 40};
ans[41] = {1, 17, 22, 27, 33, 37, 39, 40, 41};
ans[42] = {1, 17, 22, 27, 33, 37, 39, 40, 41};
ans[43] = {1, 18, 23, 28, 35, 39, 41, 42, 43};
ans[44] = {1, 18, 24, 30, 35, 40, 42, 43, 44};
ans[45] = {1, 21, 26, 31, 37, 41, 43, 44, 45};
ans[46] = {1, 3, 5, 20, 25, 33, 36, 39, 45, 46};
ans[47] = {1, 13, 18, 23, 32, 39, 43, 45, 46, 47};
ans[48] = {1, 13, 18, 23, 32, 39, 43, 45, 46, 47};
ans[49] = {1, 14, 19, 24, 33, 41, 45, 47, 48, 49};
ans[50] = {1, 14, 19, 24, 33, 41, 45, 47, 48, 49};
ans[51] = {1, 14, 19, 24, 35, 43, 47, 49, 50, 51};
ans[52] = {1, 15, 25, 29, 33, 40, 46, 49, 51, 52};
ans[53] = {1, 19, 23, 27, 37, 40, 46, 51, 52, 53};
ans[54] = {1, 19, 23, 27, 37, 40, 46, 51, 52, 53};
ans[55] = {1, 20, 25, 30, 39, 40, 47, 51, 53, 55};
ans[56] = {1, 20, 25, 30, 39, 40, 47, 51, 53, 55};
ans[57] = {1, 21, 25, 29, 40, 43, 50, 55, 56, 57};
ans[58] = {1, 4, 7, 14, 25, 27, 41, 49, 53, 57, 58};
ans[59] = {1, 6, 12, 18, 22, 32, 35, 50, 57, 58, 59};
ans[60] = {1, 6, 12, 18, 22, 32, 35, 50, 57, 58, 59};
ans[61] = {1, 9, 17, 28, 37, 47, 54, 57, 59, 60, 61};
ans[62] = {1, 10, 14, 18, 32, 35, 50, 55, 60, 61, 62};
ans[63] = {1, 13, 16, 20, 27, 40, 45, 53, 61, 62, 63};
ans[64] = {1, 14, 17, 21, 28, 33, 39, 54, 62, 63, 64};
ans[65] = {1, 19, 31, 36, 41, 50, 57, 61, 63, 64, 65};
ans[66] = {1, 19, 31, 36, 41, 50, 57, 61, 63, 64, 65};
ans[67] = {1, 19, 32, 37, 42, 51, 59, 63, 65, 66, 67};
ans[68] = {1, 20, 25, 39, 42, 52, 53, 60, 62, 64, 68};
ans[69] = {1, 21, 34, 39, 44, 53, 61, 65, 67, 68, 69};
ans[70] = {1, 21, 34, 39, 44, 53, 61, 65, 67, 68, 69};
ans[71] = {1, 23, 30, 37, 50, 53, 61, 65, 69, 70, 71};
ans[72] = {1, 5, 9, 18, 32, 35, 50, 60, 65, 70, 71, 72};
ans[73] = {1, 6, 11, 17, 26, 33, 40, 52, 69, 70, 71, 73};
ans[74] = {1, 7, 16, 18, 25, 35, 45, 58, 66, 70, 71, 74};
ans[75] = {1, 11, 17, 25, 33, 38, 45, 56, 71, 73, 74, 75};
ans[76] = {1, 12, 19, 26, 40, 41, 60, 64, 68, 70, 73, 76};
ans[77] = {1, 15, 16, 27, 39, 48, 57, 67, 70, 73, 75, 77};
ans[78] = {1, 15, 16, 27, 39, 48, 57, 67, 70, 73, 75, 77};
ans[79] = {1, 15, 22, 29, 39, 48, 59, 71, 74, 75, 77, 79};
ans[80] = {1, 20, 25, 33, 40, 49, 55, 66, 76, 77, 78, 80};
    int n;
    cin>>n;
    cout<<ans[n].size()<<endl;
    for (int x:ans[n]){
        cout<<x<<" ";
    }
    cout<<endl;
}

Test details

Test 1

Verdict: ACCEPTED

input
1

correct output
1
1

user output
1

Test 2

Verdict: ACCEPTED

input
2

correct output
2
1 2 

user output
2
1 2 

Test 3

Verdict: ACCEPTED

input
3

correct output
3
1 2 3 

user output
3
1 2 3 

Test 4

Verdict: ACCEPTED

input
4

correct output
3
1 3 4 

user output
3
1 3 4 

Test 5

Verdict: ACCEPTED

input
5

correct output
4
1 3 4 5 

user output
4
1 3 4 5 

Test 6

Verdict: ACCEPTED

input
6

correct output
4
1 3 5 6 

user output
4
1 4 5 6 

Test 7

Verdict: ACCEPTED

input
7

correct output
4
1 3 6 7 

user output
4
1 5 6 7 

Test 8

Verdict: ACCEPTED

input
8

correct output
5
1 4 6 7 8 

user output
5
1 4 6 7 8 

Test 9

Verdict: ACCEPTED

input
9

correct output
5
1 3 5 8 9 

user output
5
1 5 7 8 9 

Test 10

Verdict: ACCEPTED

input
10

correct output
5
1 3 5 9 10 

user output
5
1 6 8 9 10 

Test 11

Verdict: ACCEPTED

input
11

correct output
5
1 3 5 10 11 

user output
5
1 7 9 10 11 

Test 12

Verdict: ACCEPTED

input
12

correct output
5
1 3 5 11 12 

user output
5
1 8 10 11 12 

Test 13

Verdict: ACCEPTED

input
13

correct output
6
1 4 7 11 12 13 

user output
6
1 6 9 11 12 13 

Test 14

Verdict: ACCEPTED

input
14

correct output
6
1 3 5 8 13 14 

user output
6
1 7 10 12 13 14 

Test 15

Verdict: ACCEPTED

input
15

correct output
6
1 3 5 8 14 15 

user output
6
1 8 11 13 14 15 

Test 16

Verdict: ACCEPTED

input
16

correct output
6
1 3 5 8 15 16 

user output
6
1 9 12 14 15 16 

Test 17

Verdict: ACCEPTED

input
17

correct output
6
1 3 5 8 16 17 

user output
6
1 10 13 15 16 17 

Test 18

Verdict: ACCEPTED

input
18

correct output
6
1 3 5 8 17 18 

user output
6
1 11 14 16 17 18 

Test 19

Verdict: ACCEPTED

input
19

correct output
7
1 5 9 12 17 18 19 

user output
7
1 6 11 15 17 18 19 

Test 20

Verdict: ACCEPTED

input
20

correct output
7
1 3 5 8 11 19 20 

user output
7
1 6 12 16 18 19 20 

Test 21

Verdict: ACCEPTED

input
21

correct output
7
1 3 5 8 11 20 21 

user output
7
1 9 14 17 19 20 21 

Test 22

Verdict: ACCEPTED

input
22

correct output
7
1 3 5 8 11 21 22 

user output
7
1 10 15 18 20 21 22 

Test 23

Verdict: ACCEPTED

input
23

correct output
7
1 3 5 8 11 22 23 

user output
7
1 11 16 19 21 22 23 

Test 24

Verdict: ACCEPTED

input
24

correct output
7
1 3 5 8 11 23 24 

user output
7
1 12 17 20 22 23 24 

Test 25

Verdict: ACCEPTED

input
25

correct output
8
1 6 11 17 21 23 24 25 

user output
8
1 6 11 17 21 23 24 25 

Test 26

Verdict: ACCEPTED

input
26

correct output
8
1 6 11 18 22 24 25 26 

user output
8
1 6 11 18 22 24 25 26 

Test 27

Verdict: ACCEPTED

input
27

correct output
8
1 5 7 9 12 17 26 27 

user output
8
1 7 13 18 23 25 26 27 

Test 28

Verdict: ACCEPTED

input
28

correct output
8
1 3 5 9 12 15 27 28 

user output
8
1 8 15 20 24 25 26 28 

Test 29

Verdict: ACCEPTED

input
29

correct output
8
1 3 5 9 12 15 28 29 

user output
8
1 11 16 21 25 27 28 29 

Test 30

Verdict: ACCEPTED

input
30

correct output
8
1 3 5 9 12 15 29 30 

user output
8
1 12 16 20 23 28 29 30 

Test 31

Verdict: ACCEPTED

input
31

correct output
8
1 3 5 9 12 15 30 31 

user output
8
1 12 17 23 27 29 30 31 

Test 32

Verdict: ACCEPTED

input
32

correct output
8
1 3 5 9 12 15 31 32 

user output
8
1 13 14 22 25 28 30 32 

Test 33

Verdict: ACCEPTED

input
33

correct output
8
1 3 5 9 12 15 32 33 

user output
8
1 15 20 25 29 31 32 33 

Test 34

Verdict: ACCEPTED

input
34

correct output
8
1 3 5 9 12 15 33 34 

user output
8
1 16 21 26 30 32 33 34 

Test 35

Verdict: ACCEPTED

input
35

correct output
9
1 5 8 11 16 21 33 34 35 

user output
9
1 6 11 20 27 31 33 34 35 

Test 36

Verdict: ACCEPTED

input
36

correct output
9
1 6 11 21 23 29 32 35 36 

user output
9
1 7 10 13 17 21 34 35 36 

Test 37

Verdict: ACCEPTED

input
37

correct output
9
1 3 7 10 13 18 23 36 37 

user output
9
1 8 15 24 29 33 34 35 37 

Test 38

Verdict: ACCEPTED

input
38

correct output
9
2 4 8 11 14 19 24 37 38 

user output
9
1 11 15 19 26 32 35 37 38 

Test 39

Verdict: ACCEPTED

input
39

correct output
9
1 6 8 10 16 19 22 38 39 

user output
9
1 11 15 19 26 32 35 37 38 

Test 40

Verdict: ACCEPTED

input
40

correct output
9
1 3 5 10 15 18 21 39 40 

user output
9
1 14 15 24 29 32 34 36 40 

Test 41

Verdict: ACCEPTED

input
41

correct output
9
1 3 5 10 15 18 21 40 41 

user output
9
1 17 22 27 33 37 39 40 41 

Test 42

Verdict: ACCEPTED

input
42

correct output
9
1 3 5 10 15 18 21 41 42 

user output
9
1 17 22 27 33 37 39 40 41 

Test 43

Verdict: ACCEPTED

input
43

correct output
9
1 3 5 10 15 18 21 42 43 

user output
9
1 18 23 28 35 39 41 42 43 

Test 44

Verdict: ACCEPTED

input
44

correct output
9
1 3 5 10 15 18 21 43 44 

user output
9
1 18 24 30 35 40 42 43 44 

Test 45

Verdict: ACCEPTED

input
45

correct output
9
1 3 5 10 15 18 21 44 45 

user output
9
1 21 26 31 37 41 43 44 45 

Test 46

Verdict: ACCEPTED

input
46

correct output
10
1 3 5 20 25 33 36 39 45 46 

user output
10
1 3 5 20 25 33 36 39 45 46 

Test 47

Verdict: ACCEPTED

input
47

correct output
10
2 4 6 21 26 34 37 40 46 47 

user output
10
1 13 18 23 32 39 43 45 46 47 

Test 48

Verdict: ACCEPTED

input
48

correct output
10
1 3 5 9 12 15 25 30 47 48 

user output
10
1 13 18 23 32 39 43 45 46 47 

Test 49

Verdict: ACCEPTED

input
49

correct output
10
1 3 5 9 14 19 26 29 48 49 

user output
10
1 14 19 24 33 41 45 47 48 49 

Test 50

Verdict: ACCEPTED

input
50

correct output
10
2 4 6 10 15 20 27 30 49 50 

user output
10
1 14 19 24 33 41 45 47 48 49 

Test 51

Verdict: ACCEPTED

input
51

correct output
10
3 5 7 11 16 21 28 31 50 51 

user output
10
1 14 19 24 35 43 47 49 50 51 

Test 52

Verdict: ACCEPTED

input
52

correct output
10
1 4 7 11 13 15 26 31 51 52 

user output
10
1 15 25 29 33 40 46 49 51 52 

Test 53

Verdict: ACCEPTED

input
53

correct output
10
1 4 8 10 12 20 25 30 52 53 

user output
10
1 19 23 27 37 40 46 51 52 53 

Test 54

Verdict: ACCEPTED

input
54

correct output
10
1 3 5 9 12 19 24 29 53 54 

user output
10
1 19 23 27 37 40 46 51 52 53 

Test 55

Verdict: ACCEPTED

input
55

correct output
10
1 3 5 9 12 19 24 29 54 55 

user output
10
1 20 25 30 39 40 47 51 53 55 

Test 56

Verdict: ACCEPTED

input
56

correct output
10
1 3 5 9 12 19 24 29 55 56 

user output
10
1 20 25 30 39 40 47 51 53 55 

Test 57

Verdict: ACCEPTED

input
57

correct output
10
1 3 5 9 12 19 24 29 56 57 

user output
10
1 21 25 29 40 43 50 55 56 57 

Test 58

Verdict: ACCEPTED

input
58

correct output
11
1 3 14 21 24 27 41 49 53 57 58...

user output
11
1 4 7 14 25 27 41 49 53 57 58 

Test 59

Verdict: ACCEPTED

input
59

correct output
11
1 5 7 9 23 34 39 46 49 58 59 

user output
11
1 6 12 18 22 32 35 50 57 58 59...

Test 60

Verdict: ACCEPTED

input
60

correct output
11
1 3 5 9 27 32 39 46 49 59 60 

user output
11
1 6 12 18 22 32 35 50 57 58 59...

Test 61

Verdict: ACCEPTED

input
61

correct output
11
1 7 9 13 17 24 33 42 47 60 61 

user output
11
1 9 17 28 37 47 54 57 59 60 61...

Test 62

Verdict: ACCEPTED

input
62

correct output
11
1 3 5 9 14 23 35 38 45 61 62 

user output
11
1 10 14 18 32 35 50 55 60 61 6...

Test 63

Verdict: ACCEPTED

input
63

correct output
11
2 4 6 10 15 24 36 39 46 62 63 

user output
11
1 13 16 20 27 40 45 53 61 62 6...

Test 64

Verdict: ACCEPTED

input
64

correct output
11
1 3 5 9 17 28 33 43 46 63 64 

user output
11
1 14 17 21 28 33 39 54 62 63 6...

Test 65

Verdict: ACCEPTED

input
65

correct output
11
1 5 7 9 16 21 33 43 46 64 65 

user output
11
1 19 31 36 41 50 57 61 63 64 6...

Test 66

Verdict: ACCEPTED

input
66

correct output
11
1 4 10 15 20 22 35 39 43 65 66...

user output
11
1 19 31 36 41 50 57 61 63 64 6...

Test 67

Verdict: ACCEPTED

input
67

correct output
11
1 3 5 9 15 18 25 36 41 66 67 

user output
11
1 19 32 37 42 51 59 63 65 66 6...

Test 68

Verdict: ACCEPTED

input
68

correct output
11
1 4 6 11 18 22 26 35 41 67 68 

user output
11
1 20 25 39 42 52 53 60 62 64 6...

Test 69

Verdict: ACCEPTED

input
69

correct output
11
1 3 5 11 16 21 28 37 40 68 69 

user output
11
1 21 34 39 44 53 61 65 67 68 6...

Test 70

Verdict: ACCEPTED

input
70

correct output
11
1 5 7 9 18 23 28 35 38 69 70 

user output
11
1 21 34 39 44 53 61 65 67 68 6...

Test 71

Verdict: ACCEPTED

input
71

correct output
11
1 5 7 9 18 23 28 35 38 70 71 

user output
11
1 23 30 37 50 53 61 65 69 70 7...

Test 72

Verdict: ACCEPTED

input
72

correct output
12
1 3 5 9 17 31 36 51 54 61 71 7...

user output
12
1 5 9 18 32 35 50 60 65 70 71 ...

Test 73

Verdict: ACCEPTED

input
73

correct output
12
2 4 6 10 18 32 37 52 55 62 72 ...

user output
12
1 6 11 17 26 33 40 52 69 70 71...

Test 74

Verdict: ACCEPTED

input
74

correct output
12
3 5 7 11 19 33 38 53 56 63 73 ...

user output
12
1 7 16 18 25 35 45 58 66 70 71...

Test 75

Verdict: ACCEPTED

input
75

correct output
12
1 4 7 13 27 32 40 53 57 64 74 ...

user output
12
1 11 17 25 33 38 45 56 71 73 7...

Test 76

Verdict: ACCEPTED

input
76

correct output
12
1 3 5 9 18 33 38 54 57 64 75 7...

user output
12
1 12 19 26 40 41 60 64 68 70 7...

Test 77

Verdict: ACCEPTED

input
77

correct output
12
1 3 5 11 21 32 39 51 54 63 76 ...

user output
12
1 15 16 27 39 48 57 67 70 73 7...

Test 78

Verdict: ACCEPTED

input
78

correct output
12
1 3 5 9 12 15 27 40 45 61 77 7...

user output
12
1 15 16 27 39 48 57 67 70 73 7...

Test 79

Verdict: ACCEPTED

input
79

correct output
12
1 3 5 9 15 18 27 43 48 59 78 7...

user output
12
1 15 22 29 39 48 59 71 74 75 7...

Test 80

Verdict: ACCEPTED

input
80

correct output
12
1 5 9 12 17 19 29 38 44 57 79 ...

user output
12
1 20 25 33 40 49 55 66 76 77 7...