Submission #1345722

#TimeUsernameProblemLanguageResultExecution timeMemory
1345722thesentroTree (IOI24_tree)C++20
Compilation error
0 ms0 KiB
#include "tree.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long

void init(std::vector<int> P, std::vector<int> W) {
    p = P;
    w = W;
    n = (int)p.size();
}

long long query(int L, int R) {
      return L;
}

Compilation message (stderr)

tree.cpp: In function 'void init(std::vector<int>, std::vector<int>)':
tree.cpp:7:5: error: 'p' was not declared in this scope
    7 |     p = P;
      |     ^
tree.cpp:8:5: error: 'w' was not declared in this scope
    8 |     w = W;
      |     ^
tree.cpp:9:5: error: 'n' was not declared in this scope
    9 |     n = (int)p.size();
      |     ^