#1861
TopSort
Se dă un graf orientat aciclic cu N
noduri numerotate de la 1
la N
. Să se realizeze o sortare topologică a nodurilor.
Problema | TopSort | Operații I/O |
topsort.in /topsort.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #26600320 | Utilizator | |
Fișier | topsort.cpp | Dimensiune | 797 B |
Data încărcării | 10 Decembrie 2020, 09:34 | Scor / rezultat | Eroare de compilare |
topsort.cpp:5:14: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin ("topsort.in"); ^ topsort.cpp:6:15: error: variable 'std::ofstream four' has initializer but incomplete type ofstream four ("topsort.out"); ^ topsort.cpp: In function 'int main()': topsort.cpp:29:9: error: 'fout' was not declared in this scope fout << x << ' '; ^ topsort.cpp:30:18: error: expected unqualified-id before numeric constant for (int 0 = 1; i <= a[x].size(); i++) { ^ topsort.cpp:30:18: error: expected ';' before numeric constant topsort.cpp:30:20: error: lvalue required as left operand of assignment for (int 0 = 1; i <= a[x].size(); i++) { ^ topsort.cpp:30:25: error: 'i' was not declared in this scope for (int 0 = 1; i <= a[x].size(); i++) { ^ topsort.cpp:30:41: error: expected ')' before ';' token for (int 0 = 1; i <= a[x].size(); i++) { ^ topsort.cpp:30:43: error: 'i' was not declared in this scope for (int 0 = 1; i <= a[x].size(); i++) { ^ topsort.cpp:30:46: error: expected ';' before ')' token for (int 0 = 1; i <= a[x].size(); i++) { ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema TopSort 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ă.