Borderou de evaluare (job #3269848)
Utilizator | Data | 21 ianuarie 2025 08:44:00 | |
---|---|---|---|
Problema | Componente tare conexe | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In lambda function:
main.cpp:120:40: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and 'std::forward_list<long long int>')
120 | for(auto v:tadj)if(!vis[v])dfs(v);
| ^
In file included from /usr/include/c++/12.2.1/vector:65,
from /usr/include/c++/12.2.1/functional:62,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:71,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_bvector.h:1035:7: note: candidate: 'constexpr std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](size_type) [with _Alloc = std::allocator<bool>; reference = std::vector<bool>::reference; size_type = long unsigned int]'
1035 | operator[](size_type __n)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_bvector.h:1035:28: note: no known conversion for argument 1 from 'std::forward_list<long long int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
1035 | operator[](size_type __n)
| ~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_bvector.h:1040:7: note: candidate: 'constexpr std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](size_type) const [with _Alloc = std::allocator<bool>; const_reference = bool; size_type = long unsigned int]'
1040 | operator[](size_type __n) const
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_bvector.h:1040:28: note: no known conversion for argument 1 from 'std::forward_list<long long int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
1040 | operator[](size_type __n) const
| ~~~~~~~~~~^~~
main.cpp:120:47: error: no match for call to '(std::function<void(long long int)>) (std::forward_list<long long int>&)'
120 | for(auto v:tadj)if(!vis[v])dfs(v);
| ~~~^~~
In file included from /usr/include/c++/12.2.1/functional:59:
/usr/include/c++/12.2.1/bits/std_function.h:587:7: note: candidate: '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {long long int}]'
587 | operator()(_ArgTypes... __args) const
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/std_function.h:587:27: note: no known conversion for argument 1 from 'std::forward_list<long long int>' to 'long long int'
587 | operator()(_ArgTypes... __args) const
| ~~~~~~~~~^~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !