# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
965321 | phoenix0423 | Ancient Machine 2 (JOI23_ancient2) | C++17 | 156 ms | 1636 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;
typedef long long ll;
typedef pair<int, int> pll;
#define fastio ios::sync_with_stdio(false), cin.tie(0)
#pragma GCC optimize("Ofast")
#define pb push_back
#define eb emplace_back
#define f first
#define s second
// #define int long long
#define lowbit(x) x&-x
const int maxn = 2e5 + 5;
string Solve(int n){
string ans;
for(int i = 0; i < n; i++){
vector<int> a(1002), b(1002);
for(int j = 0; j < i; j++) a[j] = j + 1, b[j] = j + 1;
a[i] = 1000, b[i] = 1001;
a[1001] = 1001, b[1001] = 1001;
a[1000] = 1000, b[1000] = 1000;
int k = Query(1002, a, b);
if(k == 1001) ans += '1';
else ans += '0';
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |