Borderou de evaluare (job #3306305)
| Utilizator | Data | 9 august 2025 14:48:27 | |
|---|---|---|---|
| Problema | Lowest Common Ancestor | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:10:1: error: 'vector' does not name a type
10 | vector<int> v[100005];
| ^~~~~~
main.cpp:11:1: error: 'vector' does not name a type
11 | vector<pair<int, int>> euler; // indexat de la 0
| ^~~~~~
main.cpp: In function 'void dfs(int, int)':
main.cpp:15:5: error: 'euler' was not declared in this scope
15 | euler.push_back({nod, nivel});
| ^~~~~
main.cpp:20:18: error: 'v' was not declared in this scope
20 | for(auto u : v[nod]) {
| ^
main.cpp: In function 'void precalculareRmq()':
main.cpp:28:12: error: 'euler' was not declared in this scope
28 | nrmq = euler.size();
| ^~~~~
main.cpp:33:53: error: no match for 'operator=' (operand types are 'std::pair<int, int>' and '<brace-enclosed initializer list>')
33 | rmq[i][0] = {euler[i].second, euler[i].first};
| ^
In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64,
from /usr/include/c++/12.2.1/string:50,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/istream:38,
from /usr/include/c++/12.2.1/fstream:38,
from main.cpp:5:
/usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) requires _S_assignable<const _U1&, const _U2&>() [with _U2 = _U1; _T1 = int; _T2 = int]'
353 | operator=(const pair<_U1, _U2>& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: template argument deduction/substitution failed:
main.cpp:33:53: note: couldn't deduce template parameter '_U1'
33 | rmq[i][0] = {euler[i].second, euler[i].first};
| ^
/usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) requires _S_assignable<_U1, _U2>() [with _U2 = _U1; _T1 = int; _T2 = int]'
365 | operator=(pair<_U1, _U2>&& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: template argument deduction/substitution failed:
main.cpp:33:53: note: couldn't deduce template parameter '_U1'
33 | rmq[i][0] = {euler[i].second, euler[i].first};
| ^
/usr/include/c++/12.2.1/bits/stl_pair.h:330:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) requires _S_assignable<const _T1&, const _T2&>() [with _T1 = int; _T2 = int]'
330 | operator=(const pair& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:330:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::pair<int, int>&'
330 | operator=(const pair& __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:341:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) requires _S_assignable<_T1, _T2>() [with _T1 = int; _T2 = int]'
341 | operator=(pair&& __p)
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
