#4956
Se dă un graf neorientat cu n vârfuri și două numere naturale p și q. Să se determine toate lanțurile elementare formate din cel puțin p muchii și cel mult q muchii, adică au lungimea în intervalul [p,q].
| Problema | LantPQ | Operații I/O |
lantpq.in/lantpq.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64289531 | Utilizator | |
| Fișier | lantpq.cpp | Dimensiune | 1017 B |
| Data încărcării | 28 Aprilie 2026, 10:32 | Scor/rezultat | 100 puncte |
lantpq.cpp: In function ‘void back(int)’: lantpq.cpp:11:17: warning: comparison of integer expressions of different signedness: ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 11 | if(v.size() >= p && v.size() <= q) { | ~~~~~~~~~^~~~ lantpq.cpp:11:34: warning: comparison of integer expressions of different signedness: ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 11 | if(v.size() >= p && v.size() <= q) { | ~~~~~~~~~^~~~ lantpq.cpp:16:21: warning: comparison of integer expressions of different signedness: ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 16 | if(v.size() == q) | ~~~~~~~~~^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | ||
| 2 | 0.047 secunde | OK. | 20 | 20 | ||
| 3 | 0.028 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LantPQ 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ă.