Borderou de evaluare (job #3306892)
| Utilizator | Data | 14 august 2025 22:36:21 | |
|---|---|---|---|
| Problema | Parcurgere DFS - componente conexe | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void dfs(int)':
main.cpp:10:18: error: found ':' in nested-name-specifier, expected '::'
10 | while(auto it:v[nod])
| ^
| ::
main.cpp:10:16: error: 'it' has not been declared
10 | while(auto it:v[nod])
| ^~
main.cpp:10:20: error: qualified-id in declaration before '[' token
10 | while(auto it:v[nod])
| ^
main.cpp:11:16: error: 'it' was not declared in this scope; did you mean 'int'?
11 | if(viz[it]==false)
| ^~
| int
main.cpp: In function 'int main()':
main.cpp:21:23: error: no matching function for call to 'std::vector<std::vector<int> >::push_back(int&)'
21 | v[a].push_back(b);
| ~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/12.2.1/vector:64,
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_vector.h:1276:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
1276 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1276:35: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<int> >::value_type&' {aka 'const std::vector<int>&'}
1276 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1293:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
1293 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1293:30: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<int> >::value_type&&' {aka 'std::vector<int>&&'}
1293 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:22:23: error: no matching function for call to 'std::vector<std::vector<int> >::push_back(int&)'
22 | v[b].push_back(a);
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1276:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
1276 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1276:35: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<int> >::value_type&' {aka 'const std::vector<int>&'}
1276 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1293:7: note: candidate: 'constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; value_type = std::vector<int>]'
1293 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_vector.h:1293:30: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<int> >::value_type&&' {aka 'std::vector<int>&&'}
1293 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
