#437
Conex
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 | #43082896 | Utilizator | |
Fișier | conex.cpp | Dimensiune | 899 B |
Data încărcării | 30 Martie 2023, 11:50 | Scor / rezultat | Eroare de compilare |
conex.cpp:2:1: error: 'ifstream' does not name a type ifstream cin("conex.in") ^ conex.cpp: In function 'void bfs(int)': conex.cpp:8:5: error: 'p' was not declared in this scope p=u=1; ^ conex.cpp:8:7: error: 'u' was not declared in this scope p=u=1; ^ conex.cpp:9:5: error: 'c' was not declared in this scope c[p]=x; ^ conex.cpp:12:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ conex.cpp:14:38: error: expected ']' before ')' token if(a[x[j]==1 && viz[j]==0){ ^ conex.cpp:22:13: error: 'i' was not declared in this scope for(i=1;i<=u;i++){ ^ conex.cpp:23:13: error: 'cout' was not declared in this scope cout<<c[i]<<" "; ^ conex.cpp:25:9: error: 'cout' was not declared in this scope cout<<'\n'; ^ conex.cpp: In function 'int main()': conex.cpp:31:5: error: 'cin' was not declared in this scope cin>>n>>m; ^ conex.cpp:35:9: error: 'A' was not declared in this scope A[x][y]=A[y][x]=1; ^ conex.cpp:45:13: error: 'cout' was not declared in this scope cout<<"DA"; ^ conex.cpp:47:13: error: 'cout' was not declared in this scope cout<<"NU"; ^ conex.cpp:30:19: warning: unused variable 'j' [-Wunused-variable] int n,m,i,x,y,j,nrc; ^
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ă.