#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 | #41298027 | Utilizator | |
Fișier | conex.cpp | Dimensiune | 861 B |
Data încărcării | 18 Ianuarie 2023, 15:43 | Scor / rezultat | Eroare de compilare |
conex.cpp: In function 'void add(nod*&, int)': conex.cpp:19:7: error: request for member 'info' in 'd', which is of pointer type 'nod*' (maybe you meant to use '->' ?) d.info=val; ^ conex.cpp:20:7: error: request for member 'adr' in 'd', which is of pointer type 'nod*' (maybe you meant to use '->' ?) d.adr=c; ^ conex.cpp:21:7: error: request for member 'adr' in 'p', which is of pointer type 'nod*' (maybe you meant to use '->' ?) p.adr=d; ^ conex.cpp:22:7: error: request for member 'info' in 'p', which is of pointer type 'nod*' (maybe you meant to use '->' ?) p.info++; ^ conex.cpp: In function 'void dfs(int)': conex.cpp:27:18: error: request for member 'adr' in 'vf[v]', which is of pointer type 'nod*' (maybe you meant to use '->' ?) nod* p=vf[v].adr; ^ conex.cpp:29:18: error: request for member 'info' in 'p', which is of pointer type 'nod*' (maybe you meant to use '->' ?) if(viz[p.info]==0) ^ conex.cpp:30:19: error: request for member 'info' in 'p', which is of pointer type 'nod*' (maybe you meant to use '->' ?) dfs(p.info); ^ conex.cpp:31:13: error: request for member 'adr' in 'p', which is of pointer type 'nod*' (maybe you meant to use '->' ?) p=p.adr; ^ conex.cpp: In function 'int main()': conex.cpp:39:15: error: request for member 'info' in 'vf[i]', which is of pointer type 'nod*' (maybe you meant to use '->' ?) vf[i].info=0; ^ conex.cpp:40:15: error: request for member 'adr' in 'vf[i]', which is of pointer type 'nod*' (maybe you meant to use '->' ?) vf[i].adr=NULL; ^
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ă.