#589
Se dă un graf orientat ponderat cu n noduri și m arce – în care fiecare arc are asociat un cost, număr natural strict pozitiv. Folosind algoritmul Roy-Floyd, construiți matricea drumurilor minime.
| Problema | Roy-Floyd | Operații I/O |
roy-floyd.in/roy-floyd.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64536056 | Utilizator | |
| Fișier | roy-floyd.cpp | Dimensiune | 708 B |
| Data încărcării | 13 Mai 2026, 08:34 | Scor/rezultat | Eroare de compilare |
roy-floyd.cpp: In function ‘int main()’: roy-floyd.cpp:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for(int i=1;i<=n;i++) | ^~~ roy-floyd.cpp:13:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | for(int i=1;i<=m;i++) | ^~~ roy-floyd.cpp:18:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for(int k=1;k<=n;k++) | ^~~ roy-floyd.cpp:23:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 23 | for(int i=1;i<=;i++) | ^~~ roy-floyd.cpp:23:24: error: expected primary-expression before ‘;’ token 23 | for(int i=1;i<=;i++) | ^ roy-floyd.cpp:25:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 25 | for(int j=1;j<=n;j++) | ^~~ roy-floyd.cpp:28:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 28 | fout<<endl | ^~~~ roy-floyd.cpp:28:23: error: expected ‘;’ before ‘}’ token 28 | fout<<endl | ^ | ; 29 | } | ~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Roy-Floyd 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ă.