# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
965094 | Pring | Ancient Machine 2 (JOI23_ancient2) | C++17 | 96 ms | 1748 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"
using namespace std;
#ifdef MIKU
string dbmc = "\033[1;38;2;57;197;187m", dbrs = "\033[0m";
#define debug(x...) cout << dbmc << "[" << #x << "]: ", dout(x)
void dout() { cout << dbrs << endl; }
template <typename T, typename ...U>
void dout(T t, U ...u) { cout << t << (sizeof...(u) ? ", " : ""); dout(u...); }
#else
#define debug(...) 39
#endif
#define fs first
#define sc second
#define mp make_pair
#define FOR(i, j, k) for (int i = j, Z = k; i < Z; i++)
using ll = long long;
typedef pair<int, int> pii;
namespace {
string miku(int n) {
string s = "";
FOR(i, 0, n) {
int m = i + 3;
vector<int> a(m), b(m);
FOR(j, 0, m) {
a[j] = j;
b[j] = j;
}
FOR(j, 0, i) {
a[j]++;
b[j]++;
}
a[i] = i + 1;
b[i] = i + 2;
int x = Query(m, a, b);
if (x == i + 1) s.push_back('0');
else s.push_back('1');
}
return s;
}
}
string Solve(int n) {
return miku(n);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |