Submission #96393

# Submission time Handle Problem Language Result Execution time Memory
96393 2019-02-09T09:16:26 Z easrui Toys (CEOI18_toy) C++14
100 / 100
827 ms 6808 KB
#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5;
int N,tmp,fac[MAX],num[MAX],selA[MAX],selB[MAX],posA,posB,cnt,res,ans,A,B,C;
vector<int> pows[MAX];
set<int> S;
bool isP[MAX];

void act(int cur, int val, int sum)
{
    if(val>=cur) S.insert(sum+cur-1);
    if(cur==1) return;
    for(int i=2; i<=min(val,cur/i); i++){
        if(cur%i) continue;
        if(i<=val) act(cur/i,i,sum+i-1);
        if(cur/i<=val) act(i,cur/i,sum+cur/i-1);
    }
}

int main()
{
    ios_base::sync_with_stdio(0),cin.tie(0);
    cin >> N;
    act(N,N,0);
    cout << S.size() << '\n';
    for(auto it : S) cout << it << ' ';
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2684 KB Output is correct
2 Correct 5 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 4 ms 2680 KB Output is correct
5 Correct 4 ms 2680 KB Output is correct
6 Correct 4 ms 2680 KB Output is correct
7 Correct 4 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 5 ms 2680 KB Output is correct
10 Correct 3 ms 2680 KB Output is correct
11 Correct 4 ms 2680 KB Output is correct
12 Correct 4 ms 2724 KB Output is correct
13 Correct 4 ms 2680 KB Output is correct
14 Correct 4 ms 2680 KB Output is correct
15 Correct 4 ms 2680 KB Output is correct
16 Correct 4 ms 2680 KB Output is correct
17 Correct 4 ms 2680 KB Output is correct
18 Correct 4 ms 2664 KB Output is correct
19 Correct 4 ms 2684 KB Output is correct
20 Correct 4 ms 2680 KB Output is correct
21 Correct 4 ms 2680 KB Output is correct
22 Correct 4 ms 2680 KB Output is correct
23 Correct 4 ms 2680 KB Output is correct
24 Correct 4 ms 2684 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2684 KB Output is correct
2 Correct 5 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 4 ms 2680 KB Output is correct
5 Correct 4 ms 2680 KB Output is correct
6 Correct 4 ms 2680 KB Output is correct
7 Correct 4 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 5 ms 2680 KB Output is correct
10 Correct 3 ms 2680 KB Output is correct
11 Correct 4 ms 2680 KB Output is correct
12 Correct 4 ms 2724 KB Output is correct
13 Correct 4 ms 2680 KB Output is correct
14 Correct 4 ms 2680 KB Output is correct
15 Correct 4 ms 2680 KB Output is correct
16 Correct 4 ms 2680 KB Output is correct
17 Correct 4 ms 2680 KB Output is correct
18 Correct 4 ms 2664 KB Output is correct
19 Correct 4 ms 2684 KB Output is correct
20 Correct 4 ms 2680 KB Output is correct
21 Correct 4 ms 2680 KB Output is correct
22 Correct 4 ms 2680 KB Output is correct
23 Correct 4 ms 2680 KB Output is correct
24 Correct 4 ms 2684 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 4 ms 2680 KB Output is correct
27 Correct 4 ms 2680 KB Output is correct
28 Correct 4 ms 2680 KB Output is correct
29 Correct 4 ms 2680 KB Output is correct
30 Correct 4 ms 2680 KB Output is correct
31 Correct 4 ms 2680 KB Output is correct
32 Correct 4 ms 2680 KB Output is correct
33 Correct 4 ms 2680 KB Output is correct
34 Correct 4 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 4 ms 2724 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 4 ms 2684 KB Output is correct
40 Correct 5 ms 2680 KB Output is correct
41 Correct 3 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 4 ms 2680 KB Output is correct
44 Correct 3 ms 2680 KB Output is correct
45 Correct 3 ms 2684 KB Output is correct
46 Correct 3 ms 2680 KB Output is correct
47 Correct 3 ms 2680 KB Output is correct
48 Correct 3 ms 2680 KB Output is correct
49 Correct 3 ms 2680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2684 KB Output is correct
2 Correct 5 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 4 ms 2680 KB Output is correct
5 Correct 4 ms 2680 KB Output is correct
6 Correct 4 ms 2680 KB Output is correct
7 Correct 4 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 5 ms 2680 KB Output is correct
10 Correct 3 ms 2680 KB Output is correct
11 Correct 4 ms 2680 KB Output is correct
12 Correct 4 ms 2724 KB Output is correct
13 Correct 4 ms 2680 KB Output is correct
14 Correct 4 ms 2680 KB Output is correct
15 Correct 4 ms 2680 KB Output is correct
16 Correct 4 ms 2680 KB Output is correct
17 Correct 4 ms 2680 KB Output is correct
18 Correct 4 ms 2664 KB Output is correct
19 Correct 4 ms 2684 KB Output is correct
20 Correct 4 ms 2680 KB Output is correct
21 Correct 4 ms 2680 KB Output is correct
22 Correct 4 ms 2680 KB Output is correct
23 Correct 4 ms 2680 KB Output is correct
24 Correct 4 ms 2684 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 4 ms 2680 KB Output is correct
27 Correct 4 ms 2680 KB Output is correct
28 Correct 4 ms 2680 KB Output is correct
29 Correct 4 ms 2680 KB Output is correct
30 Correct 4 ms 2680 KB Output is correct
31 Correct 4 ms 2680 KB Output is correct
32 Correct 4 ms 2680 KB Output is correct
33 Correct 4 ms 2680 KB Output is correct
34 Correct 4 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 4 ms 2724 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 4 ms 2684 KB Output is correct
40 Correct 5 ms 2680 KB Output is correct
41 Correct 3 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 4 ms 2680 KB Output is correct
44 Correct 3 ms 2680 KB Output is correct
45 Correct 3 ms 2684 KB Output is correct
46 Correct 3 ms 2680 KB Output is correct
47 Correct 3 ms 2680 KB Output is correct
48 Correct 3 ms 2680 KB Output is correct
49 Correct 3 ms 2680 KB Output is correct
50 Correct 5 ms 2680 KB Output is correct
51 Correct 4 ms 2680 KB Output is correct
52 Correct 3 ms 2680 KB Output is correct
53 Correct 4 ms 2680 KB Output is correct
54 Correct 3 ms 2680 KB Output is correct
55 Correct 5 ms 2808 KB Output is correct
56 Correct 5 ms 2680 KB Output is correct
57 Correct 4 ms 2808 KB Output is correct
58 Correct 4 ms 2680 KB Output is correct
59 Correct 4 ms 2680 KB Output is correct
60 Correct 3 ms 2680 KB Output is correct
61 Correct 4 ms 2680 KB Output is correct
62 Correct 3 ms 2684 KB Output is correct
63 Correct 3 ms 2808 KB Output is correct
64 Correct 4 ms 2680 KB Output is correct
65 Correct 4 ms 2680 KB Output is correct
66 Correct 4 ms 2680 KB Output is correct
67 Correct 4 ms 2680 KB Output is correct
68 Correct 4 ms 2680 KB Output is correct
69 Correct 4 ms 2680 KB Output is correct
70 Correct 4 ms 2680 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2684 KB Output is correct
2 Correct 5 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 4 ms 2680 KB Output is correct
5 Correct 4 ms 2680 KB Output is correct
6 Correct 4 ms 2680 KB Output is correct
7 Correct 4 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 5 ms 2680 KB Output is correct
10 Correct 3 ms 2680 KB Output is correct
11 Correct 4 ms 2680 KB Output is correct
12 Correct 4 ms 2724 KB Output is correct
13 Correct 4 ms 2680 KB Output is correct
14 Correct 4 ms 2680 KB Output is correct
15 Correct 4 ms 2680 KB Output is correct
16 Correct 4 ms 2680 KB Output is correct
17 Correct 4 ms 2680 KB Output is correct
18 Correct 4 ms 2664 KB Output is correct
19 Correct 4 ms 2684 KB Output is correct
20 Correct 4 ms 2680 KB Output is correct
21 Correct 4 ms 2680 KB Output is correct
22 Correct 4 ms 2680 KB Output is correct
23 Correct 4 ms 2680 KB Output is correct
24 Correct 4 ms 2684 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 4 ms 2680 KB Output is correct
27 Correct 4 ms 2680 KB Output is correct
28 Correct 4 ms 2680 KB Output is correct
29 Correct 4 ms 2680 KB Output is correct
30 Correct 4 ms 2680 KB Output is correct
31 Correct 4 ms 2680 KB Output is correct
32 Correct 4 ms 2680 KB Output is correct
33 Correct 4 ms 2680 KB Output is correct
34 Correct 4 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 4 ms 2724 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 4 ms 2684 KB Output is correct
40 Correct 5 ms 2680 KB Output is correct
41 Correct 3 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 4 ms 2680 KB Output is correct
44 Correct 3 ms 2680 KB Output is correct
45 Correct 3 ms 2684 KB Output is correct
46 Correct 3 ms 2680 KB Output is correct
47 Correct 3 ms 2680 KB Output is correct
48 Correct 3 ms 2680 KB Output is correct
49 Correct 3 ms 2680 KB Output is correct
50 Correct 5 ms 2680 KB Output is correct
51 Correct 4 ms 2680 KB Output is correct
52 Correct 3 ms 2680 KB Output is correct
53 Correct 4 ms 2680 KB Output is correct
54 Correct 3 ms 2680 KB Output is correct
55 Correct 5 ms 2808 KB Output is correct
56 Correct 5 ms 2680 KB Output is correct
57 Correct 4 ms 2808 KB Output is correct
58 Correct 4 ms 2680 KB Output is correct
59 Correct 4 ms 2680 KB Output is correct
60 Correct 3 ms 2680 KB Output is correct
61 Correct 4 ms 2680 KB Output is correct
62 Correct 3 ms 2684 KB Output is correct
63 Correct 3 ms 2808 KB Output is correct
64 Correct 4 ms 2680 KB Output is correct
65 Correct 4 ms 2680 KB Output is correct
66 Correct 4 ms 2680 KB Output is correct
67 Correct 4 ms 2680 KB Output is correct
68 Correct 4 ms 2680 KB Output is correct
69 Correct 4 ms 2680 KB Output is correct
70 Correct 4 ms 2680 KB Output is correct
71 Correct 119 ms 3912 KB Output is correct
72 Correct 50 ms 3560 KB Output is correct
73 Correct 83 ms 3688 KB Output is correct
74 Correct 38 ms 3448 KB Output is correct
75 Correct 54 ms 3420 KB Output is correct
76 Correct 155 ms 4192 KB Output is correct
77 Correct 174 ms 4064 KB Output is correct
78 Correct 120 ms 3964 KB Output is correct
79 Correct 122 ms 4032 KB Output is correct
80 Correct 4 ms 2680 KB Output is correct
81 Correct 4 ms 2680 KB Output is correct
82 Correct 5 ms 2808 KB Output is correct
83 Correct 17 ms 3064 KB Output is correct
84 Correct 18 ms 3032 KB Output is correct
85 Correct 6 ms 2936 KB Output is correct
86 Correct 7 ms 2680 KB Output is correct
87 Correct 18 ms 3196 KB Output is correct
88 Correct 4 ms 2680 KB Output is correct
89 Correct 4 ms 2680 KB Output is correct
90 Correct 4 ms 2680 KB Output is correct
91 Correct 7 ms 2936 KB Output is correct
92 Correct 19 ms 3320 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2684 KB Output is correct
2 Correct 5 ms 2680 KB Output is correct
3 Correct 4 ms 2680 KB Output is correct
4 Correct 4 ms 2680 KB Output is correct
5 Correct 4 ms 2680 KB Output is correct
6 Correct 4 ms 2680 KB Output is correct
7 Correct 4 ms 2680 KB Output is correct
8 Correct 4 ms 2680 KB Output is correct
9 Correct 5 ms 2680 KB Output is correct
10 Correct 3 ms 2680 KB Output is correct
11 Correct 4 ms 2680 KB Output is correct
12 Correct 4 ms 2724 KB Output is correct
13 Correct 4 ms 2680 KB Output is correct
14 Correct 4 ms 2680 KB Output is correct
15 Correct 4 ms 2680 KB Output is correct
16 Correct 4 ms 2680 KB Output is correct
17 Correct 4 ms 2680 KB Output is correct
18 Correct 4 ms 2664 KB Output is correct
19 Correct 4 ms 2684 KB Output is correct
20 Correct 4 ms 2680 KB Output is correct
21 Correct 4 ms 2680 KB Output is correct
22 Correct 4 ms 2680 KB Output is correct
23 Correct 4 ms 2680 KB Output is correct
24 Correct 4 ms 2684 KB Output is correct
25 Correct 4 ms 2680 KB Output is correct
26 Correct 4 ms 2680 KB Output is correct
27 Correct 4 ms 2680 KB Output is correct
28 Correct 4 ms 2680 KB Output is correct
29 Correct 4 ms 2680 KB Output is correct
30 Correct 4 ms 2680 KB Output is correct
31 Correct 4 ms 2680 KB Output is correct
32 Correct 4 ms 2680 KB Output is correct
33 Correct 4 ms 2680 KB Output is correct
34 Correct 4 ms 2680 KB Output is correct
35 Correct 3 ms 2680 KB Output is correct
36 Correct 4 ms 2724 KB Output is correct
37 Correct 3 ms 2680 KB Output is correct
38 Correct 4 ms 2680 KB Output is correct
39 Correct 4 ms 2684 KB Output is correct
40 Correct 5 ms 2680 KB Output is correct
41 Correct 3 ms 2680 KB Output is correct
42 Correct 3 ms 2680 KB Output is correct
43 Correct 4 ms 2680 KB Output is correct
44 Correct 3 ms 2680 KB Output is correct
45 Correct 3 ms 2684 KB Output is correct
46 Correct 3 ms 2680 KB Output is correct
47 Correct 3 ms 2680 KB Output is correct
48 Correct 3 ms 2680 KB Output is correct
49 Correct 3 ms 2680 KB Output is correct
50 Correct 5 ms 2680 KB Output is correct
51 Correct 4 ms 2680 KB Output is correct
52 Correct 3 ms 2680 KB Output is correct
53 Correct 4 ms 2680 KB Output is correct
54 Correct 3 ms 2680 KB Output is correct
55 Correct 5 ms 2808 KB Output is correct
56 Correct 5 ms 2680 KB Output is correct
57 Correct 4 ms 2808 KB Output is correct
58 Correct 4 ms 2680 KB Output is correct
59 Correct 4 ms 2680 KB Output is correct
60 Correct 3 ms 2680 KB Output is correct
61 Correct 4 ms 2680 KB Output is correct
62 Correct 3 ms 2684 KB Output is correct
63 Correct 3 ms 2808 KB Output is correct
64 Correct 4 ms 2680 KB Output is correct
65 Correct 4 ms 2680 KB Output is correct
66 Correct 4 ms 2680 KB Output is correct
67 Correct 4 ms 2680 KB Output is correct
68 Correct 4 ms 2680 KB Output is correct
69 Correct 4 ms 2680 KB Output is correct
70 Correct 4 ms 2680 KB Output is correct
71 Correct 119 ms 3912 KB Output is correct
72 Correct 50 ms 3560 KB Output is correct
73 Correct 83 ms 3688 KB Output is correct
74 Correct 38 ms 3448 KB Output is correct
75 Correct 54 ms 3420 KB Output is correct
76 Correct 155 ms 4192 KB Output is correct
77 Correct 174 ms 4064 KB Output is correct
78 Correct 120 ms 3964 KB Output is correct
79 Correct 122 ms 4032 KB Output is correct
80 Correct 4 ms 2680 KB Output is correct
81 Correct 4 ms 2680 KB Output is correct
82 Correct 5 ms 2808 KB Output is correct
83 Correct 17 ms 3064 KB Output is correct
84 Correct 18 ms 3032 KB Output is correct
85 Correct 6 ms 2936 KB Output is correct
86 Correct 7 ms 2680 KB Output is correct
87 Correct 18 ms 3196 KB Output is correct
88 Correct 4 ms 2680 KB Output is correct
89 Correct 4 ms 2680 KB Output is correct
90 Correct 4 ms 2680 KB Output is correct
91 Correct 7 ms 2936 KB Output is correct
92 Correct 19 ms 3320 KB Output is correct
93 Correct 540 ms 6508 KB Output is correct
94 Correct 243 ms 5720 KB Output is correct
95 Correct 319 ms 5628 KB Output is correct
96 Correct 276 ms 5368 KB Output is correct
97 Correct 262 ms 4980 KB Output is correct
98 Correct 685 ms 6788 KB Output is correct
99 Correct 827 ms 6776 KB Output is correct
100 Correct 656 ms 6808 KB Output is correct
101 Correct 803 ms 6600 KB Output is correct
102 Correct 679 ms 6288 KB Output is correct
103 Correct 375 ms 6136 KB Output is correct
104 Correct 4 ms 2676 KB Output is correct
105 Correct 4 ms 2680 KB Output is correct
106 Correct 5 ms 2808 KB Output is correct
107 Correct 55 ms 3576 KB Output is correct
108 Correct 126 ms 4172 KB Output is correct
109 Correct 12 ms 3064 KB Output is correct
110 Correct 5 ms 2680 KB Output is correct
111 Correct 51 ms 3704 KB Output is correct
112 Correct 4 ms 2680 KB Output is correct
113 Correct 4 ms 2680 KB Output is correct
114 Correct 5 ms 2808 KB Output is correct
115 Correct 3 ms 2680 KB Output is correct
116 Correct 7 ms 2936 KB Output is correct
117 Correct 74 ms 4600 KB Output is correct