#146
graph
Călinuţa tocmai a găsit o foaie de hârtie pe care este desenat un graf orientat aciclic cu N
noduri şi M
arce, fiecare arc având o distanţă de valoare întreagă. Dându-se N
, M
şi cele M
arce cu distanţele dintre ele, trebuie să calculaţi pentru Călinuţa distanţa minimă dintre fiecare două noduri.
Grigore Moisil 2013
Problema | graph | Operații I/O |
![]() graph.in /graph.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58369465 | Utilizator | |
Fișier | graph.cpp | Dimensiune | 1.77 KB |
Data încărcării | 29 Mai 2025, 18:23 | Scor / rezultat | Eroare de compilare |
graph.cpp: In function 'void topological_sort()': graph.cpp:16:19: error: expected unqualified-id before '[' token for (auto [v, _] : adj[u]) { ^ graph.cpp:16:19: error: expected ';' before '[' token graph.cpp:16:20: error: 'v' was not declared in this scope for (auto [v, _] : adj[u]) { ^ graph.cpp:16:23: error: '_' was not declared in this scope for (auto [v, _] : adj[u]) { ^ graph.cpp: In lambda function: graph.cpp:16:26: error: expected '{' before ':' token for (auto [v, _] : adj[u]) { ^ graph.cpp: In function 'void topological_sort()': graph.cpp:16:26: error: expected ';' before ':' token graph.cpp:16:26: error: expected primary-expression before ':' token graph.cpp:16:26: error: expected ')' before ':' token graph.cpp:16:26: error: expected primary-expression before ':' token graph.cpp:16:26: error: expected ';' before ':' token graph.cpp:30:19: error: expected unqualified-id before '[' token for (auto [v, _] : adj[u]) { ^ graph.cpp:30:19: error: expected ';' before '[' token graph.cpp:30:20: error: 'v' was not declared in this scope for (auto [v, _] : adj[u]) { ^ graph.cpp:30:23: error: '_' was not declared in this scope for (auto [v, _] : adj[u]) { ^ graph.cpp: In lambda function: graph.cpp:30:26: error: expected '{' before ':' token for (auto [v, _] : adj[u]) { ^ graph.cpp: In function 'void topological_sort()': graph.cpp:30:26: error: expected ';' before ':' token graph.cpp:30:26: error: expected primary-expression before ':' token graph.cpp:30:26: error: expected ')' before ':' token graph.cpp:30:26: error: expected primary-expression before ':' token graph.cpp:30:26: error: expected ';' before ':' token graph.cpp: In function 'void solve_all_pairs()': graph.cpp:46:23: error: expected unqualified-id before '[' token for (auto [v, cost] : adj[u]) { ^ graph.cpp:46:23: error: expected ';' before '[' token graph.cpp:46:24: error: 'v' was not declared in this scope for (auto [v, cost] : adj[u]) { ^ graph.cpp:46:27: error: 'cost' was not declared in this scope for (auto [v, cost] : adj[u]) { ^ graph.cpp: In lambda function: graph.cpp:46:33: error: expected '{' before ':' token for (auto [v, cost] : adj[u]) { ^ graph.cpp: In function 'void solve_all_pairs()': graph.cpp:46:33: error: expected ';' before ':' token graph.cpp:46:33: error: expected primary-expression before ':' token graph.cpp:46:33: error: expected ')' before ':' token graph.cpp:46:33: error: expected primary-expression before ':' token graph.cpp:46:33: error: expected ';' before ':' token graph.cpp:82:1: error: expected '}' at end of input } ^ graph.cpp:82:1: error: expected '}' at end of input graph.cpp:82:1: error: expected '}' at end of input
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema graph 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ă.