#4637
Se dă un graf orientat cu n vârfuri și m arce prin lista arcelor și un număr natural k. Afișați numărul de componente tare conexe care sunt formate din k vârfuri.
| Problema | ctck11 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64336596 | Utilizator | |
| Fișier | ctck11.cpp | Dimensiune | 1008 B |
| Data încărcării | 30 Aprilie 2026, 11:41 | Scor/rezultat | Eroare de compilare |
ctck11.cpp: In function ‘void curatare()’: ctck11.cpp:19:31: error: expected primary-expression before ‘||’ token 19 | if(v1[i]==0&&v2[i]!=0)||v1[i]!=0&&v2[i]==0; | ^~ ctck11.cpp: In function ‘int poz()’: ctck11.cpp:23:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 23 | for(int i=1;i<=n;i++) | ^~~ ctck11.cpp:25:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 25 | return 0; | ^~~~~~ ctck11.cpp: In function ‘int main()’: ctck11.cpp:48:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 48 | for(int j=1;j<=n;j++) | ^~~ ctck11.cpp:50:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 50 | if(num==k) nrcomp++; | ^~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ctck11 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ă.