답안 #1084547

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1084547 2024-09-06T11:28:39 Z PagodePaiva Ancient Machine 2 (JOI23_ancient2) C++17
0 / 100
1 ms 344 KB
#include "ancient2.h"
#include<bits/stdc++.h>

using namespace std;

namespace {

int variable_example = 1;

}  // namespace

std::string Solve(int N) {
  // int m = 2;
  // std::vector<int> a(m), b(m);
  //variable_example = Query(m, a, b);
  string s;
  for(int i = 0;i < N;i++){
    int m = i+3;
    vector <int> a, b;
    for(int j = 0;j < m-2;j++){
      a.push_back(j+1);
      b.push_back(j+1);
    }
    a.push_back(i+1);
    b.push_back(i+2);
    a.push_back(i+1);
    a.push_back(i+2);
    b.push_back(i+1);
    b.push_back(i+2);
    int v = Query(m,a, b);
    if(v == i+1) s.push_back('0');
    else s.push_back('1');
  }
  return s;

}

Compilation message

ancient2.cpp:8:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    8 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -