답안 #148445

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
148445 2019-09-01T04:24:50 Z 1 WA = 5 Push Up(#3624, BaaaaaaaaaaaaaaaarkingDog, IohcEjnim, 0xrgb) List of Unique Integers (FXCUP4_unique) C++17
35 / 100
6 ms 512 KB
#include "unique.h"

std::vector<int> PickUnique(int N) {
  std::vector<int> ret(N,1);
  for(int i = 0; i < N; i++){
    if(i != 0){
      int v1 = UniqueCount(0, i);
      int v2 = UniqueCount(0, i-1);
      if(v1 != v2+1) ret[i] = 0;
    }
    if(i != N-1){
      int v1 = UniqueCount(i, N-1);
      int v2 = UniqueCount(i+1, N-1);
      if(v1 != v2+1) ret[i] = 0;
    }
  }
  return ret;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Correct : C = 4
2 Correct 5 ms 256 KB Correct : C = 16
3 Correct 5 ms 384 KB Correct : C = 96
4 Correct 5 ms 256 KB Correct : C = 196
5 Correct 6 ms 384 KB Correct : C = 196
6 Correct 5 ms 384 KB Correct : C = 304
7 Correct 5 ms 384 KB Correct : C = 396
8 Partially correct 5 ms 384 KB Partially correct : C = 596
9 Partially correct 5 ms 512 KB Partially correct : C = 708
10 Partially correct 6 ms 512 KB Partially correct : C = 796
11 Partially correct 5 ms 384 KB Partially correct : C = 796
12 Partially correct 5 ms 384 KB Partially correct : C = 796
13 Partially correct 6 ms 512 KB Partially correct : C = 796
14 Partially correct 5 ms 512 KB Partially correct : C = 796
15 Partially correct 5 ms 512 KB Partially correct : C = 796