#4027
Se dă un graf orientat aciclic (adică nu există circuite). Lungimea unui drum elementar este dată de numărul de arce. Să se determine lungimea maximă a unui drum elementar în acest graf orientat aciclic.
Folclorul informatic
Problema | LongestPath | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.4 secunde | Limita memorie |
Total: 128 MB
/
Stivă 64 MB
|
Id soluție | #56277598 | Utilizator | |
Fișier | longestpath.cpp | Dimensiune | 1.11 KB |
Data încărcării | 12 Februarie 2025, 13:11 | Scor / rezultat | 0 puncte |
longestpath.cpp: In function 'void topsort()': longestpath.cpp:38:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=0;j<G[vf].size();j++) ^ longestpath.cpp:28:8: warning: unused variable 'cate' [-Wunused-variable] { int cate=0,i,j,vf; ^ longestpath.cpp: In function 'void afisare()': longestpath.cpp:47:6: warning: unused variable 'i' [-Wunused-variable] {int i,j; ^ longestpath.cpp:47:8: warning: unused variable 'j' [-Wunused-variable] {int i,j; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
11 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
12 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LongestPath 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ă.