Borderou de evaluare (job #3368349)
| Utilizator | Data | 14 octombrie 2026 11:40:59 | |
|---|---|---|---|
| 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 'int citire(std::ifstream&, std::vector<std::vector<int> >&)':
main.cpp:17:17: error: 'n' was not declared in this scope
17 | fisier>>n>>m
| ^
main.cpp:17:20: error: 'm' was not declared in this scope
17 | fisier>>n>>m
| ^
main.cpp:16:13: warning: unused variable 'x' [-Wunused-variable]
16 | int x,y;
| ^
main.cpp:16:15: warning: unused variable 'y' [-Wunused-variable]
16 | int x,y;
| ^
main.cpp:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
29 | }
| ^
main.cpp: At global scope:
main.cpp:31:62: error: template placeholder type 'bitset<...auto...>' must be followed by a simple declarator-id
31 | void dfs(int numar, std::vector<std::vector<int>>& vectorul, std::bitset& bitsetul){
| ^~~
In file included from main.cpp:4:
/usr/include/c++/12.2.1/bitset:751:11: note: 'template<long unsigned int _Nb> class std::bitset' declared here
751 | class bitset
| ^~~~~~
main.cpp: In function 'void dfs(...)':
main.cpp:32:9: error: 'bitsetul' was not declared in this scope
32 | bitsetul.set(numar);
| ^~~~~~~~
main.cpp:32:22: error: 'numar' was not declared in this scope
32 | bitsetul.set(numar);
| ^~~~~
main.cpp:33:21: error: 'vectorul' was not declared in this scope
33 | for (auto x:vectorul[numar])
| ^~~~~~~~
main.cpp: At global scope:
main.cpp:40:87: error: template placeholder type 'bitset<...auto...>' must be followed by a simple declarator-id
40 | void numaraComponenteConexe(ofstream& fisier,std::vector<std::vector<int>>& vectorul, std::bitset& bitsetul){
| ^~~
/usr/include/c++/12.2.1/bitset:751:11: note: 'template<long unsigned int _Nb> class std::bitset' declared here
751 | class bitset
| ^~~~~~
main.cpp: In function 'void numaraComponenteConexe(...)':
main.cpp:42:23: error: 'vectorul' was not declared in this scope
42 | for (auto x : vectorul)
| ^~~~~~~~
main.cpp:43:21: error: 'bitsetul' was not declared in this scope
43 | if (bitsetul(x) == 0)
| ^~~~~~~~
main.cpp:48:9: error: 'fisier' was not declared in this scope
48 | fisier<<contor;
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
