답안 #989637

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
989637 2024-05-28T12:59:14 Z canadavid1 Ancient Machine 2 (JOI23_ancient2) C++17
10 / 100
149 ms 1556 KB
#include "ancient2.h"

#include <string>
#include <vector>
#include <algorithm>
#include <numeric>

namespace {

int variable_example = 1;

}  // namespace

std::string Solve(int N) {
  // query one bit:
  // a[i], b[i] = i+1
  // a[b] = 1000
  // b[b] = 1001
  // a,b[1001] = 1001
  // a,b[1000] = 1000
  std::vector<int> a(N+2);
  std::iota(a.begin(),a.begin()+N,1);
  a[N] = N;
  a[N+1] = N+1;
  auto b = a;
  std::string s;
  for(int i = 0; i < N; i++)
  {
    a[i] = N;
    b[i] = N+1;
    s.push_back((Query(N+2,a,b)>N) ? '1' : '0');
    a[i] = i+1;
    b[i] = i+1;
  }
  return s;
}

Compilation message

ancient2.cpp:10:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   10 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Partially correct 98 ms 412 KB Output is partially correct
2 Partially correct 100 ms 824 KB Output is partially correct
3 Partially correct 109 ms 420 KB Output is partially correct
4 Partially correct 99 ms 592 KB Output is partially correct
5 Partially correct 100 ms 680 KB Output is partially correct
6 Partially correct 123 ms 424 KB Output is partially correct
7 Partially correct 137 ms 432 KB Output is partially correct
8 Partially correct 117 ms 416 KB Output is partially correct
9 Partially correct 98 ms 416 KB Output is partially correct
10 Partially correct 98 ms 428 KB Output is partially correct
11 Partially correct 97 ms 412 KB Output is partially correct
12 Partially correct 132 ms 344 KB Output is partially correct
13 Partially correct 98 ms 344 KB Output is partially correct
14 Partially correct 102 ms 420 KB Output is partially correct
15 Partially correct 115 ms 584 KB Output is partially correct
16 Partially correct 136 ms 416 KB Output is partially correct
17 Partially correct 99 ms 344 KB Output is partially correct
18 Partially correct 149 ms 1352 KB Output is partially correct
19 Partially correct 97 ms 588 KB Output is partially correct
20 Partially correct 128 ms 1160 KB Output is partially correct
21 Partially correct 98 ms 344 KB Output is partially correct
22 Partially correct 99 ms 416 KB Output is partially correct
23 Partially correct 102 ms 1556 KB Output is partially correct
24 Partially correct 99 ms 412 KB Output is partially correct
25 Partially correct 99 ms 416 KB Output is partially correct
26 Partially correct 116 ms 420 KB Output is partially correct
27 Partially correct 120 ms 344 KB Output is partially correct
28 Partially correct 101 ms 808 KB Output is partially correct
29 Partially correct 97 ms 344 KB Output is partially correct
30 Partially correct 96 ms 344 KB Output is partially correct
31 Partially correct 110 ms 916 KB Output is partially correct
32 Partially correct 98 ms 416 KB Output is partially correct
33 Partially correct 97 ms 416 KB Output is partially correct
34 Partially correct 130 ms 1156 KB Output is partially correct
35 Partially correct 138 ms 344 KB Output is partially correct
36 Partially correct 129 ms 1108 KB Output is partially correct
37 Partially correct 129 ms 344 KB Output is partially correct
38 Partially correct 101 ms 428 KB Output is partially correct
39 Partially correct 105 ms 900 KB Output is partially correct
40 Partially correct 119 ms 408 KB Output is partially correct
41 Partially correct 100 ms 584 KB Output is partially correct
42 Partially correct 149 ms 344 KB Output is partially correct
43 Partially correct 98 ms 416 KB Output is partially correct
44 Partially correct 145 ms 416 KB Output is partially correct
45 Partially correct 124 ms 344 KB Output is partially correct
46 Partially correct 138 ms 1104 KB Output is partially correct
47 Partially correct 103 ms 584 KB Output is partially correct
48 Partially correct 95 ms 344 KB Output is partially correct
49 Partially correct 98 ms 432 KB Output is partially correct
50 Partially correct 96 ms 412 KB Output is partially correct
51 Partially correct 93 ms 344 KB Output is partially correct
52 Partially correct 121 ms 344 KB Output is partially correct
53 Partially correct 97 ms 416 KB Output is partially correct
54 Partially correct 103 ms 1376 KB Output is partially correct
55 Partially correct 107 ms 412 KB Output is partially correct
56 Partially correct 100 ms 660 KB Output is partially correct
57 Partially correct 103 ms 1516 KB Output is partially correct
58 Partially correct 96 ms 432 KB Output is partially correct
59 Partially correct 100 ms 412 KB Output is partially correct
60 Partially correct 107 ms 432 KB Output is partially correct
61 Partially correct 99 ms 424 KB Output is partially correct
62 Partially correct 100 ms 1280 KB Output is partially correct
63 Partially correct 98 ms 344 KB Output is partially correct