Submission #1045513

# Submission time Handle Problem Language Result Execution time Memory
1045513 2024-08-06T04:42:47 Z 변재우(#11018) Ancient Machine 2 (JOI23_ancient2) C++17
10 / 100
140 ms 1180 KB
#include "ancient2.h"
#include <bits/stdc++.h>
using namespace std;

const int M=1002;

string Solve(int N) {
  int a=0, b=0;
  string ret;
  for(int i=0; i<N; i++) {
    vector<int> X(M, 0), Y(M, 0);
    for(int j=0; j<M; j++) X[j]=j, Y[j]=j;
    if(ret.empty() || ret.back()=='1') {
      for(int i=0; i<b; i++) Y[i]=i+1;
      X[b]=M-1, Y[b]=M-2;
    }
    else {
      for(int i=0; i<a; i++) X[i]=i+1;
      X[a]=M-1, Y[a]=M-2;
    }
    if(Query(M, X, Y)==M-1) a++, ret+='0';
    else b++, ret+='1';
  }
  return ret;
}
# Verdict Execution time Memory Grader output
1 Partially correct 117 ms 592 KB Output is partially correct
2 Partially correct 84 ms 344 KB Output is partially correct
3 Partially correct 100 ms 344 KB Output is partially correct
4 Partially correct 88 ms 344 KB Output is partially correct
5 Partially correct 98 ms 344 KB Output is partially correct
6 Partially correct 110 ms 436 KB Output is partially correct
7 Partially correct 116 ms 344 KB Output is partially correct
8 Partially correct 103 ms 344 KB Output is partially correct
9 Partially correct 87 ms 676 KB Output is partially correct
10 Partially correct 83 ms 428 KB Output is partially correct
11 Partially correct 91 ms 428 KB Output is partially correct
12 Partially correct 95 ms 684 KB Output is partially correct
13 Partially correct 87 ms 428 KB Output is partially correct
14 Partially correct 93 ms 428 KB Output is partially correct
15 Partially correct 102 ms 344 KB Output is partially correct
16 Partially correct 88 ms 436 KB Output is partially correct
17 Partially correct 113 ms 432 KB Output is partially correct
18 Partially correct 122 ms 452 KB Output is partially correct
19 Partially correct 102 ms 1144 KB Output is partially correct
20 Partially correct 86 ms 432 KB Output is partially correct
21 Partially correct 91 ms 344 KB Output is partially correct
22 Partially correct 93 ms 672 KB Output is partially correct
23 Partially correct 89 ms 428 KB Output is partially correct
24 Partially correct 88 ms 344 KB Output is partially correct
25 Partially correct 104 ms 1180 KB Output is partially correct
26 Partially correct 85 ms 344 KB Output is partially correct
27 Partially correct 87 ms 432 KB Output is partially correct
28 Partially correct 96 ms 896 KB Output is partially correct
29 Partially correct 129 ms 432 KB Output is partially correct
30 Partially correct 92 ms 344 KB Output is partially correct
31 Partially correct 85 ms 344 KB Output is partially correct
32 Partially correct 131 ms 432 KB Output is partially correct
33 Partially correct 97 ms 1132 KB Output is partially correct
34 Partially correct 94 ms 652 KB Output is partially correct
35 Partially correct 90 ms 344 KB Output is partially correct
36 Partially correct 87 ms 644 KB Output is partially correct
37 Partially correct 124 ms 344 KB Output is partially correct
38 Partially correct 88 ms 436 KB Output is partially correct
39 Partially correct 98 ms 828 KB Output is partially correct
40 Partially correct 103 ms 600 KB Output is partially correct
41 Partially correct 102 ms 344 KB Output is partially correct
42 Partially correct 97 ms 428 KB Output is partially correct
43 Partially correct 87 ms 820 KB Output is partially correct
44 Partially correct 84 ms 344 KB Output is partially correct
45 Partially correct 111 ms 428 KB Output is partially correct
46 Partially correct 87 ms 436 KB Output is partially correct
47 Partially correct 103 ms 456 KB Output is partially correct
48 Partially correct 106 ms 344 KB Output is partially correct
49 Partially correct 91 ms 428 KB Output is partially correct
50 Partially correct 90 ms 344 KB Output is partially correct
51 Partially correct 125 ms 684 KB Output is partially correct
52 Partially correct 103 ms 704 KB Output is partially correct
53 Partially correct 101 ms 444 KB Output is partially correct
54 Partially correct 86 ms 836 KB Output is partially correct
55 Partially correct 91 ms 432 KB Output is partially correct
56 Partially correct 101 ms 428 KB Output is partially correct
57 Partially correct 99 ms 1148 KB Output is partially correct
58 Partially correct 88 ms 344 KB Output is partially correct
59 Partially correct 140 ms 684 KB Output is partially correct
60 Partially correct 89 ms 1156 KB Output is partially correct
61 Partially correct 85 ms 344 KB Output is partially correct
62 Partially correct 93 ms 428 KB Output is partially correct
63 Partially correct 112 ms 660 KB Output is partially correct