# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
900558 | qin | Ancient Machine 2 (JOI23_ancient2) | C++17 | 71 ms | 1216 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "ancient2.h"
#define fi first
#define se second
#define ssize(x) int(x.size())
#define pn printf("\n");
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int inf = 2e09; ll infll = 2e18; int mod = 119<<23|1;
string Solve(int n){
string s = "";
for(int i = 0; i < n; ++i){
vector<int> a(i+3), b(i+3);
for(int j = 0; j < i; ++j) a[j] = j+1, b[j] = j+1;
a[i] = i+1, b[i] = i+2;
a[i+1] = i+1, b[i+1] = i+1;
a[i+2] = i+2, b[i+2] = i+2;
int tmp = Query(ssize(a), a, b);
s += char(tmp+'0');
}
return s;
}
#ifdef DEBUG
void answer(){
}
signed main(){
int T = 1;
for(++T; --T; ) answer();
return 0;
}
#endif
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |