#3423
Se dă un graf orientat cu n vârfuri și m arce prin lista arcelor. Afișați componentele tare conexe formate din număr maxim de vârfuri.
| Problema | ctcmax | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64518822 | Utilizator | |
| Fișier | ctcmax.cpp | Dimensiune | 1.44 KB |
| Data încărcării | 12 Mai 2026, 10:50 | Scor/rezultat | 60 puncte |
ctcmax.cpp: In function ‘void dfs1(int)’: ctcmax.cpp:14:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 14 | for (int i = 0; i < g[x].size(); i++) | ~~^~~~~~~~~~~~~ ctcmax.cpp: In function ‘void dfs2(int)’: ctcmax.cpp:24:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 24 | for (int i = 0; i < gt[x].size(); i++) | ~~^~~~~~~~~~~~~~ ctcmax.cpp: In function ‘int main()’: ctcmax.cpp:56:28: warning: comparison of integer expressions of different signedness: ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 56 | if (comp[i].size() > maxim) | ~~~~~~~~~~~~~~~^~~~~~~ ctcmax.cpp:61:28: warning: comparison of integer expressions of different signedness: ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 61 | if (comp[i].size() == maxim) | ~~~~~~~~~~~~~~~^~~~~~~~ ctcmax.cpp:65:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 65 | for (int j = 0; j < comp[i].size(); j++) | ~~^~~~~~~~~~~~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 60 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ctcmax 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ă.