#541
Lant1
Se dă lista muchiilor unui graf neorientat și trei vârfuri p q r
. Să se determine un lanț cu extremitățile p q
care conține vârful r
.
Problema | Lant1 | Operații I/O |
lant1.in /lant1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #34658556 | Utilizator | |
Fișier | lant1.cpp | Dimensiune | 1.37 KB |
Data încărcării | 09 Februarie 2022, 11:15 | Scor / rezultat | Eroare de compilare |
lant1.cpp:2:19: warning: extra tokens at end of #include directive [enabled by default] #include <fstream>#include <queue> ^ lant1.cpp:3:10: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include <stack>using namespace std; ^ lant1.cpp:3:17: warning: extra tokens at end of #include directive [enabled by default] #include <stack>using namespace std; ^ lant1.cpp:5:1: error: 'ifstream' does not name a type ifstream cin("lant1.in"); ^ lant1.cpp:6:1: error: 'ofstream' does not name a type ofstream cout("lant1.out"); ^ lant1.cpp: In function 'void citire()': lant1.cpp:13:5: error: 'cin' was not declared in this scope cin >> n >> p >> q >> r; ^ lant1.cpp: In function 'void bf(int, int)': lant1.cpp:20:5: error: 'queue' was not declared in this scope queue<int> c; ^ lant1.cpp:20:11: error: expected primary-expression before 'int' queue<int> c; ^ lant1.cpp:20:11: error: expected ';' before 'int' lant1.cpp:21:5: error: 'c' was not declared in this scope c.push(X); ^ lant1.cpp: At global scope: lant1.cpp:39:1: error: 'stack' does not name a type stack<int> s; ^ lant1.cpp: In function 'void drum(int)': lant1.cpp:48:17: error: 's' was not declared in this scope s.push(x); ^ lant1.cpp:53:12: error: 's' was not declared in this scope while(!s.empty()) ^ lant1.cpp:55:9: error: 'cout' was not declared in this scope cout << s.top() << ' '; ^ lant1.cpp: In function 'int main()': lant1.cpp:70:5: error: 'cout' was not declared in this scope cout << nr << '\n'; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lant1 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ă.