Submission #869392

# Submission time Handle Problem Language Result Execution time Memory
869392 2023-11-04T09:06:08 Z irmuun Ancient Machine 2 (JOI23_ancient2) C++17
0 / 100
0 ms 344 KB
#include<bits/stdc++.h>
#include "ancient2.h"

using namespace std;
 
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

string Solve(int n){
    vector<int>a={1,1,2},b={2,1,2};
    string ans="";
    int m=3;
    for(int i=0;i<n;i++){
        int q=Query(m,a,b);
        if(q==i+1){
            ans+='0';
        }
        else{
            ans+='1';
        }
        a.insert(a.begin(),0);
        b.insert(b.begin(),0);
        for(auto &x:a){
            x++;
        }
        for(auto &x:b){
            x++;
        }
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -