#475
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și două vârfuri p q
. Să se determine toate lanțurile elementare cu extremitățile p
și q
.
Problema | Lant | Operații I/O |
![]() lant.in /lant.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58472774 | Utilizator | |
Fișier | lant.cpp | Dimensiune | 992 B |
Data încărcării | 08 Iunie 2025, 23:20 | Scor / rezultat | Eroare de compilare |
lant.cpp: In function 'void dfs(int)': lant.cpp:5:9: error: 'st' was not declared in this scope st[++l] = u; ^ lant.cpp:5:14: error: 'l' was not declared in this scope st[++l] = u; ^ lant.cpp:6:9: error: 'v' was not declared in this scope v[u] = 1; ^ lant.cpp:7:18: error: 'q' was not declared in this scope if (u == q && l >= 2) { ^ lant.cpp:8:13: error: 'gasit' was not declared in this scope gasit = 1; ^ lant.cpp:10:17: error: 'g' was not declared in this scope g << st[i] << (i < l ? ' ' : endl); ^ lant.cpp:12:34: error: 'n' was not declared in this scope for (int i = 1; i <= n; i++) ^ lant.cpp:13:21: error: 'a' was not declared in this scope if (a[u][i] && !v[i]) ^ lant.cpp: In function 'int main()': lant.cpp:26:20: warning: unused variable 'st' [-Wunused-variable] int a[21][21], st[21], v[21], l = 0, gasit = 0; ^ lant.cpp:26:35: warning: unused variable 'l' [-Wunused-variable] int a[21][21], st[21], v[21], l = 0, gasit = 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lant 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ă.