#include "unique.h"
int cnt[200][200];
std::vector<int> PickUnique(int N) {
std::vector<int> ret(N,1);
for(int i=0;i<N;i++) {
cnt[i][i]=1;
for(int j=0;j<i;j++) {
cnt[j][i]=UniqueCount(j,i);
}
}
for(int i=0;i<N;i++) for(int j=0;j<i;j++) if(cnt[j][i]<=cnt[j+1][i]) ret[j]=0;
for(int i=N-1;i>=0;i--) for(int j=N-1;j>i;j--) if(cnt[i][j]<=cnt[i][j-1]) ret[j]=0;
return ret;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Correct : C = 1 |
2 |
Correct |
5 ms |
256 KB |
Correct : C = 10 |
3 |
Correct |
5 ms |
384 KB |
Correct : C = 300 |
4 |
Partially correct |
5 ms |
384 KB |
Partially correct : C = 1225 |
5 |
Partially correct |
5 ms |
384 KB |
Partially correct : C = 1225 |
6 |
Partially correct |
5 ms |
384 KB |
Partially correct : C = 2926 |
7 |
Partially correct |
5 ms |
512 KB |
Partially correct : C = 4950 |
8 |
Partially correct |
6 ms |
512 KB |
Partially correct : C = 11175 |
9 |
Partially correct |
6 ms |
512 KB |
Partially correct : C = 15753 |
10 |
Partially correct |
5 ms |
640 KB |
Partially correct : C = 19900 |
11 |
Partially correct |
6 ms |
640 KB |
Partially correct : C = 19900 |
12 |
Partially correct |
6 ms |
640 KB |
Partially correct : C = 19900 |
13 |
Partially correct |
6 ms |
560 KB |
Partially correct : C = 19900 |
14 |
Partially correct |
6 ms |
640 KB |
Partially correct : C = 19900 |
15 |
Partially correct |
6 ms |
640 KB |
Partially correct : C = 19900 |