#4073
Se dă lista muchiilor unui graf neorientat cu n noduri și m muchii și un șir de q noduri. Să se determine pentru fiecare nod x din șir numărul de noduri din componenta conexă din care face parte x.
| Problema | ComponenteConexe5 | Operații I/O |
componenteconexe5.in/componenteconexe5.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64575287 | Utilizator | |
| Fișier | componenteconexe5.cpp | Dimensiune | 1.06 KB |
| Data încărcării | 15 Mai 2026, 11:14 | Scor/rezultat | 0 puncte |
componenteconexe5.cpp: In function ‘int main()’: componenteconexe5.cpp:42:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 42 | for(i=1;i<=g.n;i++) | ^~~ componenteconexe5.cpp:48:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 48 | for(k=1;k<=q;k++) | ^~~ componenteconexe5.cpp:24:17: warning: unused variable ‘max’ [-Wunused-variable] 24 | int i,j,nrc,max,nrn,q,k; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.003 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 4 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 5 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ComponenteConexe5 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ă.