#541
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 | #34658637 | Utilizator | |
Fișier | lant1.cpp | Dimensiune | 1.39 KB |
Data încărcării | 09 Februarie 2022, 11:16 | Scor / rezultat | Eroare de compilare |
lant1.cpp:1:19: warning: extra tokens at end of #include directive [enabled by default] #include <fstream>#include <queue>#include <stack>using namespace std; ^ lant1.cpp:1:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include <fstream>#include <queue>#include <stack>using namespace std; ^ lant1.cpp:3:1: error: 'ifstream' does not name a type ifstream cin("lant1.in"); ^ lant1.cpp:4:1: error: 'ofstream' does not name a type ofstream cout("lant1.out"); ^ lant1.cpp: In function 'void citire()': lant1.cpp:11:5: error: 'cin' was not declared in this scope cin >> n >> p >> q >> r; ^ lant1.cpp: In function 'void BF(int, int)': lant1.cpp:17:5: error: 'queue' was not declared in this scope queue <int> c; ^ lant1.cpp:17:12: error: expected primary-expression before 'int' queue <int> c; ^ lant1.cpp:17:12: error: expected ';' before 'int' lant1.cpp:18:5: error: 'c' was not declared in this scope c.push(x); ^ lant1.cpp: At global scope: lant1.cpp:36:1: error: 'stack' does not name a type stack <int> s; ^ lant1.cpp: In function 'void drum(int)': lant1.cpp:43:17: error: 's' was not declared in this scope s.push(x); ^ lant1.cpp:47:12: error: 's' was not declared in this scope while(!s.empty()) ^ lant1.cpp:49:9: error: 'cout' was not declared in this scope cout << s.top() <<' '; ^ lant1.cpp: In function 'int main()': lant1.cpp:63:5: error: 'cout' was not declared in this scope cout << nrn <<'\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ă.