#include "unique.h"
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
const int mxN = 205;
int pre[mxN], suf[mxN];
std::vector<int> PickUnique(int N) {
FOR(i,0,N-1){
pre[i] = UniqueCount(0,i);
suf[N-1-i] = UniqueCount(N-1-i,N-1);
}
vector<int> ans(N);
FOR(i,0,N-1){
ans[i] = (i == 0 ? 1 : (pre[i]>pre[i-1])) && (i == N-1 ? 1 : (suf[i]>suf[i+1]));
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
384 KB |
Correct : C = 4 |
2 |
Correct |
5 ms |
384 KB |
Correct : C = 10 |
3 |
Correct |
4 ms |
384 KB |
Correct : C = 50 |
4 |
Correct |
5 ms |
384 KB |
Correct : C = 100 |
5 |
Correct |
5 ms |
384 KB |
Correct : C = 100 |
6 |
Correct |
5 ms |
384 KB |
Correct : C = 154 |
7 |
Correct |
5 ms |
384 KB |
Correct : C = 200 |
8 |
Correct |
5 ms |
384 KB |
Correct : C = 300 |
9 |
Correct |
6 ms |
512 KB |
Correct : C = 356 |
10 |
Correct |
5 ms |
512 KB |
Correct : C = 400 |
11 |
Correct |
5 ms |
512 KB |
Correct : C = 400 |
12 |
Correct |
4 ms |
512 KB |
Correct : C = 400 |
13 |
Correct |
5 ms |
512 KB |
Correct : C = 400 |
14 |
Correct |
5 ms |
512 KB |
Correct : C = 400 |
15 |
Correct |
5 ms |
512 KB |
Correct : C = 400 |