#438
ComponenteConexe
Se dă lista muchiilor unui graf neorientat. Să se afișeze componentele conexe ale acestui graf.
Problema | ComponenteConexe | Operații I/O |
componenteconexe.in /componenteconexe.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #45079808 | Utilizator | |
Fișier | componenteconexe.cpp | Dimensiune | 747 B |
Data încărcării | 02 Octombrie 2023, 12:05 | Scor / rezultat | Eroare de compilare |
componenteconexe.cpp:6:1: error: expected ',' or ';' before 'ofstream' ofstream fout("componenteconexe.out") ^ componenteconexe.cpp: In function 'void citire()': componenteconexe.cpp:11:10: error: 'n' was not declared in this scope fin>>n; ^ componenteconexe.cpp:14:12: error: 'a' was not declared in this scope if(a[i][j]==0) ^ componenteconexe.cpp:17:13: error: 'm' was not declared in this scope m++ ^ componenteconexe.cpp:18:9: error: expected ';' before '}' token } ^ componenteconexe.cpp: In function 'void df(int)': componenteconexe.cpp:24:5: error: 'viz' was not declared in this scope viz[x]=nrc; ^ componenteconexe.cpp:24:12: error: 'nrc' was not declared in this scope viz[x]=nrc; ^ componenteconexe.cpp:25:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:26:12: error: 'a' was not declared in this scope if(a[i][x]&&viz[i]==0) ^ componenteconexe.cpp: In function 'int main()': componenteconexe.cpp:32:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:33:12: error: 'viz' was not declared in this scope if(viz[i]==0) ^ componenteconexe.cpp:35:9: error: 'mc' was not declared in this scope mc++; ^ componenteconexe.cpp:38:5: error: 'fout' was not declared in this scope fout<<mc<<endl; ^ componenteconexe.cpp:38:11: error: 'mc' was not declared in this scope fout<<mc<<endl; ^ componenteconexe.cpp:41:20: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ componenteconexe.cpp:42:16: error: 'viz' was not declared in this scope if(viz[i]==k) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe 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ă.