# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
93395 | 2019-01-08T07:59:50 Z | Kastanda | Toys (CEOI18_toy) | C++11 | 2891 ms | 91288 KB |
#include<bits/stdc++.h> #define pb push_back using namespace std; const int N = 100005; int n; vector < int > D; set < int > M[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for (int i = 1; i * i <= n; i++) if (n % i == 0) D.pb(i), D.pb(n / i); sort(D.begin(), D.end()); D.resize(unique(D.begin(), D.end()) - D.begin()); M[0].insert(0); for (int i = 1; i < D.size(); i++) for (int j = 0; j < i; j++) if (D[i] % D[j] == 0) { int d = D[i] / D[j] - 1; for (int a : M[j]) M[i].insert(a + d); } int last = (int)D.size() - 1; cout << (int)M[last].size() << "\n"; for (int a : M[last]) cout << a << " "; return (0); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 4984 KB | Output is correct |
2 | Correct | 5 ms | 4984 KB | Output is correct |
3 | Correct | 5 ms | 5112 KB | Output is correct |
4 | Correct | 6 ms | 4984 KB | Output is correct |
5 | Correct | 5 ms | 4984 KB | Output is correct |
6 | Correct | 5 ms | 5112 KB | Output is correct |
7 | Correct | 5 ms | 4984 KB | Output is correct |
8 | Correct | 5 ms | 4984 KB | Output is correct |
9 | Correct | 5 ms | 4988 KB | Output is correct |
10 | Correct | 5 ms | 4984 KB | Output is correct |
11 | Correct | 5 ms | 4984 KB | Output is correct |
12 | Correct | 5 ms | 4984 KB | Output is correct |
13 | Correct | 5 ms | 4984 KB | Output is correct |
14 | Correct | 5 ms | 5112 KB | Output is correct |
15 | Correct | 5 ms | 4984 KB | Output is correct |
16 | Correct | 5 ms | 5084 KB | Output is correct |
17 | Correct | 5 ms | 4984 KB | Output is correct |
18 | Correct | 5 ms | 4984 KB | Output is correct |
19 | Correct | 5 ms | 4984 KB | Output is correct |
20 | Correct | 5 ms | 4984 KB | Output is correct |
21 | Correct | 5 ms | 4984 KB | Output is correct |
22 | Correct | 5 ms | 4984 KB | Output is correct |
23 | Correct | 5 ms | 4984 KB | Output is correct |
24 | Correct | 10 ms | 4984 KB | Output is correct |
25 | Correct | 5 ms | 4984 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 4984 KB | Output is correct |
2 | Correct | 5 ms | 4984 KB | Output is correct |
3 | Correct | 5 ms | 5112 KB | Output is correct |
4 | Correct | 6 ms | 4984 KB | Output is correct |
5 | Correct | 5 ms | 4984 KB | Output is correct |
6 | Correct | 5 ms | 5112 KB | Output is correct |
7 | Correct | 5 ms | 4984 KB | Output is correct |
8 | Correct | 5 ms | 4984 KB | Output is correct |
9 | Correct | 5 ms | 4988 KB | Output is correct |
10 | Correct | 5 ms | 4984 KB | Output is correct |
11 | Correct | 5 ms | 4984 KB | Output is correct |
12 | Correct | 5 ms | 4984 KB | Output is correct |
13 | Correct | 5 ms | 4984 KB | Output is correct |
14 | Correct | 5 ms | 5112 KB | Output is correct |
15 | Correct | 5 ms | 4984 KB | Output is correct |
16 | Correct | 5 ms | 5084 KB | Output is correct |
17 | Correct | 5 ms | 4984 KB | Output is correct |
18 | Correct | 5 ms | 4984 KB | Output is correct |
19 | Correct | 5 ms | 4984 KB | Output is correct |
20 | Correct | 5 ms | 4984 KB | Output is correct |
21 | Correct | 5 ms | 4984 KB | Output is correct |
22 | Correct | 5 ms | 4984 KB | Output is correct |
23 | Correct | 5 ms | 4984 KB | Output is correct |
24 | Correct | 10 ms | 4984 KB | Output is correct |
25 | Correct | 5 ms | 4984 KB | Output is correct |
26 | Correct | 5 ms | 5084 KB | Output is correct |
27 | Correct | 5 ms | 5112 KB | Output is correct |
28 | Correct | 11 ms | 5112 KB | Output is correct |
29 | Correct | 5 ms | 5084 KB | Output is correct |
30 | Correct | 5 ms | 4984 KB | Output is correct |
31 | Correct | 5 ms | 5112 KB | Output is correct |
32 | Correct | 5 ms | 5112 KB | Output is correct |
33 | Correct | 5 ms | 5112 KB | Output is correct |
34 | Correct | 5 ms | 4984 KB | Output is correct |
35 | Correct | 5 ms | 4984 KB | Output is correct |
36 | Correct | 5 ms | 5112 KB | Output is correct |
37 | Correct | 5 ms | 5112 KB | Output is correct |
38 | Correct | 5 ms | 5112 KB | Output is correct |
39 | Correct | 5 ms | 5112 KB | Output is correct |
40 | Correct | 5 ms | 5112 KB | Output is correct |
41 | Correct | 6 ms | 5112 KB | Output is correct |
42 | Correct | 5 ms | 4984 KB | Output is correct |
43 | Correct | 5 ms | 4984 KB | Output is correct |
44 | Correct | 6 ms | 4984 KB | Output is correct |
45 | Correct | 5 ms | 5112 KB | Output is correct |
46 | Correct | 5 ms | 4984 KB | Output is correct |
47 | Correct | 5 ms | 5112 KB | Output is correct |
48 | Correct | 6 ms | 5112 KB | Output is correct |
49 | Correct | 5 ms | 5160 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 4984 KB | Output is correct |
2 | Correct | 5 ms | 4984 KB | Output is correct |
3 | Correct | 5 ms | 5112 KB | Output is correct |
4 | Correct | 6 ms | 4984 KB | Output is correct |
5 | Correct | 5 ms | 4984 KB | Output is correct |
6 | Correct | 5 ms | 5112 KB | Output is correct |
7 | Correct | 5 ms | 4984 KB | Output is correct |
8 | Correct | 5 ms | 4984 KB | Output is correct |
9 | Correct | 5 ms | 4988 KB | Output is correct |
10 | Correct | 5 ms | 4984 KB | Output is correct |
11 | Correct | 5 ms | 4984 KB | Output is correct |
12 | Correct | 5 ms | 4984 KB | Output is correct |
13 | Correct | 5 ms | 4984 KB | Output is correct |
14 | Correct | 5 ms | 5112 KB | Output is correct |
15 | Correct | 5 ms | 4984 KB | Output is correct |
16 | Correct | 5 ms | 5084 KB | Output is correct |
17 | Correct | 5 ms | 4984 KB | Output is correct |
18 | Correct | 5 ms | 4984 KB | Output is correct |
19 | Correct | 5 ms | 4984 KB | Output is correct |
20 | Correct | 5 ms | 4984 KB | Output is correct |
21 | Correct | 5 ms | 4984 KB | Output is correct |
22 | Correct | 5 ms | 4984 KB | Output is correct |
23 | Correct | 5 ms | 4984 KB | Output is correct |
24 | Correct | 10 ms | 4984 KB | Output is correct |
25 | Correct | 5 ms | 4984 KB | Output is correct |
26 | Correct | 5 ms | 5084 KB | Output is correct |
27 | Correct | 5 ms | 5112 KB | Output is correct |
28 | Correct | 11 ms | 5112 KB | Output is correct |
29 | Correct | 5 ms | 5084 KB | Output is correct |
30 | Correct | 5 ms | 4984 KB | Output is correct |
31 | Correct | 5 ms | 5112 KB | Output is correct |
32 | Correct | 5 ms | 5112 KB | Output is correct |
33 | Correct | 5 ms | 5112 KB | Output is correct |
34 | Correct | 5 ms | 4984 KB | Output is correct |
35 | Correct | 5 ms | 4984 KB | Output is correct |
36 | Correct | 5 ms | 5112 KB | Output is correct |
37 | Correct | 5 ms | 5112 KB | Output is correct |
38 | Correct | 5 ms | 5112 KB | Output is correct |
39 | Correct | 5 ms | 5112 KB | Output is correct |
40 | Correct | 5 ms | 5112 KB | Output is correct |
41 | Correct | 6 ms | 5112 KB | Output is correct |
42 | Correct | 5 ms | 4984 KB | Output is correct |
43 | Correct | 5 ms | 4984 KB | Output is correct |
44 | Correct | 6 ms | 4984 KB | Output is correct |
45 | Correct | 5 ms | 5112 KB | Output is correct |
46 | Correct | 5 ms | 4984 KB | Output is correct |
47 | Correct | 5 ms | 5112 KB | Output is correct |
48 | Correct | 6 ms | 5112 KB | Output is correct |
49 | Correct | 5 ms | 5160 KB | Output is correct |
50 | Correct | 8 ms | 5368 KB | Output is correct |
51 | Correct | 8 ms | 5284 KB | Output is correct |
52 | Correct | 7 ms | 5240 KB | Output is correct |
53 | Correct | 8 ms | 5240 KB | Output is correct |
54 | Correct | 6 ms | 5240 KB | Output is correct |
55 | Correct | 9 ms | 5368 KB | Output is correct |
56 | Correct | 9 ms | 5368 KB | Output is correct |
57 | Correct | 8 ms | 5468 KB | Output is correct |
58 | Correct | 5 ms | 4984 KB | Output is correct |
59 | Correct | 5 ms | 5112 KB | Output is correct |
60 | Correct | 6 ms | 5112 KB | Output is correct |
61 | Correct | 7 ms | 5240 KB | Output is correct |
62 | Correct | 6 ms | 5112 KB | Output is correct |
63 | Correct | 5 ms | 5112 KB | Output is correct |
64 | Correct | 5 ms | 4988 KB | Output is correct |
65 | Correct | 7 ms | 5188 KB | Output is correct |
66 | Correct | 6 ms | 5112 KB | Output is correct |
67 | Correct | 6 ms | 4984 KB | Output is correct |
68 | Correct | 5 ms | 5112 KB | Output is correct |
69 | Correct | 6 ms | 5112 KB | Output is correct |
70 | Correct | 6 ms | 5112 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 4984 KB | Output is correct |
2 | Correct | 5 ms | 4984 KB | Output is correct |
3 | Correct | 5 ms | 5112 KB | Output is correct |
4 | Correct | 6 ms | 4984 KB | Output is correct |
5 | Correct | 5 ms | 4984 KB | Output is correct |
6 | Correct | 5 ms | 5112 KB | Output is correct |
7 | Correct | 5 ms | 4984 KB | Output is correct |
8 | Correct | 5 ms | 4984 KB | Output is correct |
9 | Correct | 5 ms | 4988 KB | Output is correct |
10 | Correct | 5 ms | 4984 KB | Output is correct |
11 | Correct | 5 ms | 4984 KB | Output is correct |
12 | Correct | 5 ms | 4984 KB | Output is correct |
13 | Correct | 5 ms | 4984 KB | Output is correct |
14 | Correct | 5 ms | 5112 KB | Output is correct |
15 | Correct | 5 ms | 4984 KB | Output is correct |
16 | Correct | 5 ms | 5084 KB | Output is correct |
17 | Correct | 5 ms | 4984 KB | Output is correct |
18 | Correct | 5 ms | 4984 KB | Output is correct |
19 | Correct | 5 ms | 4984 KB | Output is correct |
20 | Correct | 5 ms | 4984 KB | Output is correct |
21 | Correct | 5 ms | 4984 KB | Output is correct |
22 | Correct | 5 ms | 4984 KB | Output is correct |
23 | Correct | 5 ms | 4984 KB | Output is correct |
24 | Correct | 10 ms | 4984 KB | Output is correct |
25 | Correct | 5 ms | 4984 KB | Output is correct |
26 | Correct | 5 ms | 5084 KB | Output is correct |
27 | Correct | 5 ms | 5112 KB | Output is correct |
28 | Correct | 11 ms | 5112 KB | Output is correct |
29 | Correct | 5 ms | 5084 KB | Output is correct |
30 | Correct | 5 ms | 4984 KB | Output is correct |
31 | Correct | 5 ms | 5112 KB | Output is correct |
32 | Correct | 5 ms | 5112 KB | Output is correct |
33 | Correct | 5 ms | 5112 KB | Output is correct |
34 | Correct | 5 ms | 4984 KB | Output is correct |
35 | Correct | 5 ms | 4984 KB | Output is correct |
36 | Correct | 5 ms | 5112 KB | Output is correct |
37 | Correct | 5 ms | 5112 KB | Output is correct |
38 | Correct | 5 ms | 5112 KB | Output is correct |
39 | Correct | 5 ms | 5112 KB | Output is correct |
40 | Correct | 5 ms | 5112 KB | Output is correct |
41 | Correct | 6 ms | 5112 KB | Output is correct |
42 | Correct | 5 ms | 4984 KB | Output is correct |
43 | Correct | 5 ms | 4984 KB | Output is correct |
44 | Correct | 6 ms | 4984 KB | Output is correct |
45 | Correct | 5 ms | 5112 KB | Output is correct |
46 | Correct | 5 ms | 4984 KB | Output is correct |
47 | Correct | 5 ms | 5112 KB | Output is correct |
48 | Correct | 6 ms | 5112 KB | Output is correct |
49 | Correct | 5 ms | 5160 KB | Output is correct |
50 | Correct | 8 ms | 5368 KB | Output is correct |
51 | Correct | 8 ms | 5284 KB | Output is correct |
52 | Correct | 7 ms | 5240 KB | Output is correct |
53 | Correct | 8 ms | 5240 KB | Output is correct |
54 | Correct | 6 ms | 5240 KB | Output is correct |
55 | Correct | 9 ms | 5368 KB | Output is correct |
56 | Correct | 9 ms | 5368 KB | Output is correct |
57 | Correct | 8 ms | 5468 KB | Output is correct |
58 | Correct | 5 ms | 4984 KB | Output is correct |
59 | Correct | 5 ms | 5112 KB | Output is correct |
60 | Correct | 6 ms | 5112 KB | Output is correct |
61 | Correct | 7 ms | 5240 KB | Output is correct |
62 | Correct | 6 ms | 5112 KB | Output is correct |
63 | Correct | 5 ms | 5112 KB | Output is correct |
64 | Correct | 5 ms | 4988 KB | Output is correct |
65 | Correct | 7 ms | 5188 KB | Output is correct |
66 | Correct | 6 ms | 5112 KB | Output is correct |
67 | Correct | 6 ms | 4984 KB | Output is correct |
68 | Correct | 5 ms | 5112 KB | Output is correct |
69 | Correct | 6 ms | 5112 KB | Output is correct |
70 | Correct | 6 ms | 5112 KB | Output is correct |
71 | Correct | 408 ms | 23224 KB | Output is correct |
72 | Correct | 292 ms | 18892 KB | Output is correct |
73 | Correct | 393 ms | 21176 KB | Output is correct |
74 | Correct | 219 ms | 15736 KB | Output is correct |
75 | Correct | 252 ms | 16632 KB | Output is correct |
76 | Correct | 678 ms | 29684 KB | Output is correct |
77 | Correct | 624 ms | 26788 KB | Output is correct |
78 | Correct | 523 ms | 25372 KB | Output is correct |
79 | Correct | 527 ms | 24964 KB | Output is correct |
80 | Correct | 6 ms | 5112 KB | Output is correct |
81 | Correct | 5 ms | 4984 KB | Output is correct |
82 | Correct | 8 ms | 5368 KB | Output is correct |
83 | Correct | 55 ms | 8416 KB | Output is correct |
84 | Correct | 69 ms | 9208 KB | Output is correct |
85 | Correct | 19 ms | 6264 KB | Output is correct |
86 | Correct | 6 ms | 4984 KB | Output is correct |
87 | Correct | 80 ms | 9728 KB | Output is correct |
88 | Correct | 6 ms | 4984 KB | Output is correct |
89 | Correct | 6 ms | 5120 KB | Output is correct |
90 | Correct | 6 ms | 5112 KB | Output is correct |
91 | Correct | 23 ms | 6904 KB | Output is correct |
92 | Correct | 94 ms | 11256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 4984 KB | Output is correct |
2 | Correct | 5 ms | 4984 KB | Output is correct |
3 | Correct | 5 ms | 5112 KB | Output is correct |
4 | Correct | 6 ms | 4984 KB | Output is correct |
5 | Correct | 5 ms | 4984 KB | Output is correct |
6 | Correct | 5 ms | 5112 KB | Output is correct |
7 | Correct | 5 ms | 4984 KB | Output is correct |
8 | Correct | 5 ms | 4984 KB | Output is correct |
9 | Correct | 5 ms | 4988 KB | Output is correct |
10 | Correct | 5 ms | 4984 KB | Output is correct |
11 | Correct | 5 ms | 4984 KB | Output is correct |
12 | Correct | 5 ms | 4984 KB | Output is correct |
13 | Correct | 5 ms | 4984 KB | Output is correct |
14 | Correct | 5 ms | 5112 KB | Output is correct |
15 | Correct | 5 ms | 4984 KB | Output is correct |
16 | Correct | 5 ms | 5084 KB | Output is correct |
17 | Correct | 5 ms | 4984 KB | Output is correct |
18 | Correct | 5 ms | 4984 KB | Output is correct |
19 | Correct | 5 ms | 4984 KB | Output is correct |
20 | Correct | 5 ms | 4984 KB | Output is correct |
21 | Correct | 5 ms | 4984 KB | Output is correct |
22 | Correct | 5 ms | 4984 KB | Output is correct |
23 | Correct | 5 ms | 4984 KB | Output is correct |
24 | Correct | 10 ms | 4984 KB | Output is correct |
25 | Correct | 5 ms | 4984 KB | Output is correct |
26 | Correct | 5 ms | 5084 KB | Output is correct |
27 | Correct | 5 ms | 5112 KB | Output is correct |
28 | Correct | 11 ms | 5112 KB | Output is correct |
29 | Correct | 5 ms | 5084 KB | Output is correct |
30 | Correct | 5 ms | 4984 KB | Output is correct |
31 | Correct | 5 ms | 5112 KB | Output is correct |
32 | Correct | 5 ms | 5112 KB | Output is correct |
33 | Correct | 5 ms | 5112 KB | Output is correct |
34 | Correct | 5 ms | 4984 KB | Output is correct |
35 | Correct | 5 ms | 4984 KB | Output is correct |
36 | Correct | 5 ms | 5112 KB | Output is correct |
37 | Correct | 5 ms | 5112 KB | Output is correct |
38 | Correct | 5 ms | 5112 KB | Output is correct |
39 | Correct | 5 ms | 5112 KB | Output is correct |
40 | Correct | 5 ms | 5112 KB | Output is correct |
41 | Correct | 6 ms | 5112 KB | Output is correct |
42 | Correct | 5 ms | 4984 KB | Output is correct |
43 | Correct | 5 ms | 4984 KB | Output is correct |
44 | Correct | 6 ms | 4984 KB | Output is correct |
45 | Correct | 5 ms | 5112 KB | Output is correct |
46 | Correct | 5 ms | 4984 KB | Output is correct |
47 | Correct | 5 ms | 5112 KB | Output is correct |
48 | Correct | 6 ms | 5112 KB | Output is correct |
49 | Correct | 5 ms | 5160 KB | Output is correct |
50 | Correct | 8 ms | 5368 KB | Output is correct |
51 | Correct | 8 ms | 5284 KB | Output is correct |
52 | Correct | 7 ms | 5240 KB | Output is correct |
53 | Correct | 8 ms | 5240 KB | Output is correct |
54 | Correct | 6 ms | 5240 KB | Output is correct |
55 | Correct | 9 ms | 5368 KB | Output is correct |
56 | Correct | 9 ms | 5368 KB | Output is correct |
57 | Correct | 8 ms | 5468 KB | Output is correct |
58 | Correct | 5 ms | 4984 KB | Output is correct |
59 | Correct | 5 ms | 5112 KB | Output is correct |
60 | Correct | 6 ms | 5112 KB | Output is correct |
61 | Correct | 7 ms | 5240 KB | Output is correct |
62 | Correct | 6 ms | 5112 KB | Output is correct |
63 | Correct | 5 ms | 5112 KB | Output is correct |
64 | Correct | 5 ms | 4988 KB | Output is correct |
65 | Correct | 7 ms | 5188 KB | Output is correct |
66 | Correct | 6 ms | 5112 KB | Output is correct |
67 | Correct | 6 ms | 4984 KB | Output is correct |
68 | Correct | 5 ms | 5112 KB | Output is correct |
69 | Correct | 6 ms | 5112 KB | Output is correct |
70 | Correct | 6 ms | 5112 KB | Output is correct |
71 | Correct | 408 ms | 23224 KB | Output is correct |
72 | Correct | 292 ms | 18892 KB | Output is correct |
73 | Correct | 393 ms | 21176 KB | Output is correct |
74 | Correct | 219 ms | 15736 KB | Output is correct |
75 | Correct | 252 ms | 16632 KB | Output is correct |
76 | Correct | 678 ms | 29684 KB | Output is correct |
77 | Correct | 624 ms | 26788 KB | Output is correct |
78 | Correct | 523 ms | 25372 KB | Output is correct |
79 | Correct | 527 ms | 24964 KB | Output is correct |
80 | Correct | 6 ms | 5112 KB | Output is correct |
81 | Correct | 5 ms | 4984 KB | Output is correct |
82 | Correct | 8 ms | 5368 KB | Output is correct |
83 | Correct | 55 ms | 8416 KB | Output is correct |
84 | Correct | 69 ms | 9208 KB | Output is correct |
85 | Correct | 19 ms | 6264 KB | Output is correct |
86 | Correct | 6 ms | 4984 KB | Output is correct |
87 | Correct | 80 ms | 9728 KB | Output is correct |
88 | Correct | 6 ms | 4984 KB | Output is correct |
89 | Correct | 6 ms | 5120 KB | Output is correct |
90 | Correct | 6 ms | 5112 KB | Output is correct |
91 | Correct | 23 ms | 6904 KB | Output is correct |
92 | Correct | 94 ms | 11256 KB | Output is correct |
93 | Correct | 2549 ms | 82048 KB | Output is correct |
94 | Correct | 1354 ms | 56820 KB | Output is correct |
95 | Correct | 1503 ms | 59444 KB | Output is correct |
96 | Correct | 1519 ms | 53432 KB | Output is correct |
97 | Correct | 1343 ms | 49160 KB | Output is correct |
98 | Correct | 2718 ms | 89988 KB | Output is correct |
99 | Correct | 2891 ms | 91288 KB | Output is correct |
100 | Correct | 2631 ms | 87936 KB | Output is correct |
101 | Correct | 2489 ms | 81868 KB | Output is correct |
102 | Correct | 2287 ms | 74128 KB | Output is correct |
103 | Correct | 1887 ms | 67004 KB | Output is correct |
104 | Correct | 5 ms | 5116 KB | Output is correct |
105 | Correct | 5 ms | 5112 KB | Output is correct |
106 | Correct | 11 ms | 5624 KB | Output is correct |
107 | Correct | 190 ms | 14232 KB | Output is correct |
108 | Correct | 461 ms | 25088 KB | Output is correct |
109 | Correct | 42 ms | 7928 KB | Output is correct |
110 | Correct | 5 ms | 5116 KB | Output is correct |
111 | Correct | 230 ms | 16860 KB | Output is correct |
112 | Correct | 5 ms | 5112 KB | Output is correct |
113 | Correct | 5 ms | 5112 KB | Output is correct |
114 | Correct | 10 ms | 5624 KB | Output is correct |
115 | Correct | 5 ms | 5112 KB | Output is correct |
116 | Correct | 28 ms | 6392 KB | Output is correct |
117 | Correct | 437 ms | 29248 KB | Output is correct |