Submission #1365056

#TimeUsernameProblemLanguageResultExecution timeMemory
1365056d4nd3rConnecting Supertrees (IOI20_supertrees)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
 
#define fastIO ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(0)
 
using ll = long long;
 
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vll = vector<ll>;
using vpi = vector<pii>;
using vvi = vector<vi>;
 
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
 
#define all(x) (x).begin(), (x).end()
#define read(v) for(auto& x : v) cin >> x
#define pb push_back
#define rs resize

#include "supertrees.h"

int construct(std::vector<std::vector<int>> p) {
	int n = p.size();
	vvi ans(n, vi (n, 0));
    
    for (int i = 0; i < n-1; i++) {
        ans[i][i+1] = 1;
    }
    
	build(answer);
	return 1;
}

Compilation message (stderr)

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