# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
70769 |
2018-08-23T10:30:01 Z |
Diuven |
Toys (CEOI18_toy) |
C++14 |
|
6 ms |
4984 KB |
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
int n;
vector<int> V, D[200010];
map<int, int> cnt;
void init(){
int m=n;
for(int i=2; i*i<=m; i++){
while(m%i==0){ m/=i, V.push_back(i); }
}
if(m>1) V.push_back(m);
sort(V.begin(), V.end());
}
int main(){
ios::sync_with_stdio(0); cin.tie(0);
cin>>n;
init();
D[0].push_back(0);
for(int i=1; i<(int)V.size(); i++){
vector<int> &W=D[i];
for(int j=0; j<i; j++)
if(V[i]%V[j]==0)
for(int x:D[j]) W.push_back(x+V[i]/V[j]-1);
sort(W.begin(), W.end());
W.resize(unique(W.begin(), W.end())-W.begin());
}
cout<<D[V.size()-1].size()<<'\n';
for(int x:D[V.size()-1]) cout<<x<<' ';
cout<<'\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
4984 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
4984 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
4984 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
4984 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
4984 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |