#437
Se dă lista muchiilor unui graf neorientat. Să se verifice dacă graful este sau nu conex.
| Problema | Conex | Operații I/O |
conex.in/conex.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63917896 | Utilizator | |
| Fișier | conex.cpp | Dimensiune | 557 B |
| Data încărcării | 26 Martie 2026, 13:40 | Scor/rezultat | Eroare de compilare |
conex.cpp:3:11: error: variable 'std::ifstream f' has initializer but incomplete type ifstream f("conex.in") ^ conex.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream g("conex.out") ^ conex.cpp: In function 'int bfs(int)': conex.cpp:12:3: error: 'x' was not declared in this scope x[1]=start; ^ conex.cpp:13:3: error: 'v' was not declared in this scope v[start]=1; ^ conex.cpp:17:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ conex.cpp:18:21: error: 'a' was not declared in this scope if(v[i]==0 && a[k][i]==1) ^ conex.cpp: In function 'int main()': conex.cpp:29:9: error: 'm' was not declared in this scope f>>m; ^ conex.cpp:32:5: error: 'a' was not declared in this scope a[i][j]=1; ^ conex.cpp:33:16: error: 'n' was not declared in this scope if(bfs(1)==n) ^ conex.cpp:34:9: error: 'g' was not declared in this scope g<<"DA"; ^ conex.cpp:36:9: error: 'g' was not declared in this scope g<<"NU"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Conex face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.