#476
Lanturi
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și trei vârfuri p q r
. Să se determine toate lanțurile elementare cu extremitățile în p
și q
care conțin vârful r
.
Problema | Lanturi | Operații I/O |
lanturi.in /lanturi.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #42489088 | Utilizator | |
Fișier | lanturi.cpp | Dimensiune | 971 B |
Data încărcării | 07 Martie 2023, 21:12 | Scor / rezultat | Eroare de compilare |
lanturi.cpp: In function 'bool valid(int)': lanturi.cpp:20:21: error: 'st' was not declared in this scope return(k>1 && a[st[k]][st[k-1]]==1); ^ lanturi.cpp: In function 'bool solutie(int)': lanturi.cpp:25:8: error: 'st' was not declared in this scope if(st[k]==q) return true; ^ lanturi.cpp: In function 'void afisare(int)': lanturi.cpp:34:19: error: 'st' was not declared in this scope cout<<st[i]<<" "; ^ lanturi.cpp: In function 'void bkt(int)': lanturi.cpp:45:13: error: 'st' was not declared in this scope st[k]=i; ^ lanturi.cpp: In function 'int main()': lanturi.cpp:60:5: error: 'st' was not declared in this scope st[1]=p; ^ lanturi.cpp: In function 'bool valid(int)': lanturi.cpp:21:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ lanturi.cpp: In function 'bool solutie(int)': lanturi.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lanturi 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ă.