Submission #818422

# Submission time Handle Problem Language Result Execution time Memory
818422 2023-08-10T04:48:31 Z tengiz05 Ancient Machine 2 (JOI23_ancient2) C++17
10 / 100
196 ms 620 KB
#include "ancient2.h"
#ifndef EVAL
#include "grader.cpp"
#endif

#include <string>
#include <vector>

using namespace std;
namespace {

}  // namespace

std::string Solve(int n) {
  int m = n + 2;
  std::vector<int> a(m), b(m);
  for (int i = 0; i < n - 1; i++) {
      a[i] = b[i] = i + 1;
  }
  string s(n, '?');
  for (int i = n - 1; i >= 0; i--) {
      a[i] = n;
      b[i] = n + 1;
      a[n] = b[n] = n;
      a[n + 1] = b[n + 1] = n + 1;
      int val = Query(m, a, b);
      if (val == n) {
          s[i] = '0';
      } else {
          s[i] = '1';
      }
  }
  return s;
}
# Verdict Execution time Memory Grader output
1 Partially correct 137 ms 428 KB Output is partially correct
2 Partially correct 132 ms 304 KB Output is partially correct
3 Partially correct 138 ms 336 KB Output is partially correct
4 Partially correct 137 ms 280 KB Output is partially correct
5 Partially correct 156 ms 284 KB Output is partially correct
6 Partially correct 139 ms 304 KB Output is partially correct
7 Partially correct 132 ms 280 KB Output is partially correct
8 Partially correct 154 ms 452 KB Output is partially correct
9 Partially correct 132 ms 284 KB Output is partially correct
10 Partially correct 138 ms 620 KB Output is partially correct
11 Partially correct 151 ms 304 KB Output is partially correct
12 Partially correct 128 ms 304 KB Output is partially correct
13 Partially correct 140 ms 284 KB Output is partially correct
14 Partially correct 138 ms 288 KB Output is partially correct
15 Partially correct 133 ms 320 KB Output is partially correct
16 Partially correct 170 ms 280 KB Output is partially correct
17 Partially correct 144 ms 384 KB Output is partially correct
18 Partially correct 156 ms 336 KB Output is partially correct
19 Partially correct 144 ms 356 KB Output is partially correct
20 Partially correct 130 ms 280 KB Output is partially correct
21 Partially correct 134 ms 328 KB Output is partially correct
22 Partially correct 149 ms 376 KB Output is partially correct
23 Partially correct 140 ms 284 KB Output is partially correct
24 Partially correct 137 ms 324 KB Output is partially correct
25 Partially correct 141 ms 304 KB Output is partially correct
26 Partially correct 144 ms 300 KB Output is partially correct
27 Partially correct 144 ms 328 KB Output is partially correct
28 Partially correct 150 ms 284 KB Output is partially correct
29 Partially correct 147 ms 284 KB Output is partially correct
30 Partially correct 134 ms 284 KB Output is partially correct
31 Partially correct 132 ms 512 KB Output is partially correct
32 Partially correct 135 ms 284 KB Output is partially correct
33 Partially correct 142 ms 352 KB Output is partially correct
34 Partially correct 158 ms 284 KB Output is partially correct
35 Partially correct 145 ms 320 KB Output is partially correct
36 Partially correct 131 ms 304 KB Output is partially correct
37 Partially correct 138 ms 412 KB Output is partially correct
38 Partially correct 134 ms 292 KB Output is partially correct
39 Partially correct 196 ms 284 KB Output is partially correct
40 Partially correct 143 ms 396 KB Output is partially correct
41 Partially correct 131 ms 300 KB Output is partially correct
42 Partially correct 139 ms 412 KB Output is partially correct
43 Partially correct 140 ms 280 KB Output is partially correct
44 Partially correct 144 ms 300 KB Output is partially correct
45 Partially correct 138 ms 304 KB Output is partially correct
46 Partially correct 133 ms 284 KB Output is partially correct
47 Partially correct 148 ms 388 KB Output is partially correct
48 Partially correct 142 ms 308 KB Output is partially correct
49 Partially correct 135 ms 444 KB Output is partially correct
50 Partially correct 136 ms 280 KB Output is partially correct
51 Partially correct 133 ms 280 KB Output is partially correct
52 Partially correct 151 ms 520 KB Output is partially correct
53 Partially correct 142 ms 308 KB Output is partially correct
54 Partially correct 177 ms 344 KB Output is partially correct
55 Partially correct 139 ms 532 KB Output is partially correct
56 Partially correct 146 ms 288 KB Output is partially correct
57 Partially correct 136 ms 280 KB Output is partially correct
58 Partially correct 164 ms 472 KB Output is partially correct
59 Partially correct 143 ms 284 KB Output is partially correct
60 Partially correct 136 ms 280 KB Output is partially correct
61 Partially correct 169 ms 292 KB Output is partially correct
62 Partially correct 145 ms 364 KB Output is partially correct
63 Partially correct 133 ms 304 KB Output is partially correct