제출 #1330624

#제출 시각아이디문제언어결과실행 시간메모리
1330624tralalero_tralalaAncient Machine 2 (JOI23_ancient2)C++17
0 / 100
0 ms348 KiB
#include "ancient2.h"
#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fore(i,a,b) for(lli i = (a), abcdxd = (b); i < abcdxd; i++)
#define f first
#define s second
#define pb push_back
#define ENDL '\n'
#define sz(s) lli((s).size())
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
using namespace std;
typedef int lli;
typedef pair<lli,lli> ii;
typedef vector<lli> vi;
typedef vector<ii> vii;
typedef long double ld;
#define deb(x) cout << #x << ": " << x << endl;

// namespace {

int variable_example = 1;

// }  // namespace

std::string Solve(int N) {
  string s(N, '0');
  lli m = 1002;
  vi a(m, 0), b(m, 0);
  a[m-2] = m-2, a[m-1] = m-1;
  b[m-2] = m-2, b[m-1] = m-1;
  fore(i,0,N){
    a[i] = m-2;
    b[i] = m-1;
    if (Query(m, a, b) == m-1) s[i] = '1';
    // a[i] = i+1;
    // b[i] = i+1;
  }
  return s;
}
#Verdict Execution timeMemoryGrader output
Fetching results...