#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 | #50707244 | Utilizator | |
Fișier | lant1.cpp | Dimensiune | 1.14 KB |
Data încărcării | 23 Aprilie 2024, 13:42 | Scor / rezultat | Eroare de compilare |
lant1.cpp:12:12: error: conflicting declaration 'std::queue<int> q' queue<int> q; ^ lant1.cpp:11:11: error: 'q' has a previous declaration as 'int q' int n, p, q, r, cnt; ^ lant1.cpp: In function 'void BFS(int)': lant1.cpp:20:7: error: request for member 'push' in 'q', which is of non-class type 'int' q.push(x); ^ lant1.cpp:22:14: error: request for member 'empty' in 'q', which is of non-class type 'int' while(!q.empty()) ^ lant1.cpp:24:19: error: request for member 'front' in 'q', which is of non-class type 'int' int t = q.front(); ^ lant1.cpp:25:11: error: request for member 'pop' in 'q', which is of non-class type 'int' q.pop(); ^ lant1.cpp:30:19: error: request for member 'push' in 'q', which is of non-class type 'int' q.push(w); ^ lant1.cpp: In function 'int main()': lant1.cpp:51:5: error: expected ';' before 'int' int x = p; ^ lant1.cpp:52:11: error: 'x' was not declared in this scope while(x != r) ^ lant1.cpp:54:13: error: 'x' was not declared in this scope fout << x << " "; ^ lant1.cpp:58:15: error: 'class std::stack<int>' has no member named 'emprt' while(!st.emprt()) ^
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ă.