답안 #964425

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
964425 2024-04-16T19:42:59 Z marinaluca Super Dango Maker (JOI22_dango3) C++17
컴파일 오류
0 ms 0 KB
#include "dango3.h"

#include <bits/stdc++.h>
using namespace std;

namespace{
  
int asa = 1;
void Solve (vector <int> v, int x){
    if (x == 1){
        Answer(v);
        return;
    }
    int mijl = x / 2;
    vector <int> rez;
    for (int i = v.size(); -- i;){
        swap (v[i], v.back());
        int y = v.back();
        v.pop_back();
        if (Query(v) < mijl)
            v.push_back(y);
        else
            rez.push_back(y);
    }
    Solve (v, mijl);
    Solve(rez, x - mijl);
}
}// namespace
 
void solve (int N, int M){
    vector <int> v;
    for (int i = 0; i < N * M; ++ i){
        v.push_back(1 + i);
    }
    Solve(v, M);
}

Compilation message

dango3.cpp:8:5: warning: '{anonymous}::asa' defined but not used [-Wunused-variable]
    8 | int asa = 1;
      |     ^~~
/usr/bin/ld: /tmp/cc6hAkQt.o: in function `main':
grader.cpp:(.text.startup+0x111): undefined reference to `Solve(int, int)'
collect2: error: ld returned 1 exit status