Borderou de evaluare (job #2144152)
| Utilizator | Data | 26 februarie 2018 16:07:12 | |
|---|---|---|---|
| Problema | Parcurgere DFS - componente conexe | Status | done |
| Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void dfs(int)’:
user.cpp:10:22: error: request for member ‘size’ in ‘gr.std::vector<_Tp, _Alloc>::operator[]<int, std::allocator<int> >(((std::vector<int>::size_type)u))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}’
for(i=0; i<gr[u].size(); i++) {
^
user.cpp:11:22: error: invalid types ‘__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}[int]’ for array subscript
if(!a[gr[u][i]]) {
^
user.cpp:12:24: error: invalid types ‘__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}[int]’ for array subscript
dfs(gr[u][i]);
^
user.cpp: In function ‘int main()’:
user.cpp:22:10: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
g[a].pushback(b);
^
user.cpp:23:10: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
g[b].pushback(a);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
