제출 #603429

#제출 시각아이디문제언어결과실행 시간메모리
603429Sam_a17슈퍼트리 잇기 (IOI20_supertrees)C++14
컴파일 에러
0 ms0 KiB
// #include "A.cpp"
#include <bits/stdc++.h>
// #include <vector>
using namespace std;

#define sz(x) (int((x).size()))
#define len(x) (int)x.length()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define dbg(x) cout << #x << " " << x << endl;

#define pb push_back
#define ld long double
#define ll long long

int construct(std::vector<std::vector<int>> p) {
	int n = p.size();
	bool allOne = true;
  for(int i = 0; i < n; i++) {
    for(int j = 0; j < n; j++) {
      if(p[i][j] != allOne) {
        allOne = false;
      }
    }
  }

  if(allOne) {
    vector<vector<int>> answ(n, vector<int> (n, 0));
    for(int i = 0; i < n - 1; i++){
      answ[i][i + 1] = 1;
      answ[i + 1][i] = 1;
    }
	  build(answ);
    return 1;
  }


	return 1;
}

컴파일 시 표준 에러 (stderr) 메시지

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:33:4: error: 'build' was not declared in this scope
   33 |    build(answ);
      |    ^~~~~