제출 #965321

#제출 시각아이디문제언어결과실행 시간메모리
965321phoenix0423Ancient Machine 2 (JOI23_ancient2)C++17
10 / 100
156 ms1636 KiB
#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 timeMemoryGrader output
Fetching results...