#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 | #50509049 | Utilizator | |
Fișier | lant1.cpp | Dimensiune | 888 B |
Data încărcării | 12 Aprilie 2024, 09:06 | Scor / rezultat | Eroare de compilare |
lant1.cpp: In function 'void BFS(int)': lant1.cpp:9:1: error: 'v' was not declared in this scope v[1]=nod; ^ lant1.cpp:10:1: error: 'k' was not declared in this scope k[nod]=1; ^ lant1.cpp:14:19: error: 'b' was not declared in this scope if(k[i]==0 && b[l][i]==1) { ^ lant1.cpp: In function 'int main()': lant1.cpp:24:10: error: 'bfs' was not declared in this scope bfs(p); ^ lant1.cpp: At global scope: lant1.cpp:28:5: error: redefinition of 'int n' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:5: error: 'int n' previously declared here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:7: error: redefinition of 'int p' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:7: error: 'int p' previously declared here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:9: error: redefinition of 'int q' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:9: error: 'int q' previously declared here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:11: error: redefinition of 'int r' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:11: error: 'int r' previously declared here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:23: error: redefinition of 'int a [101][101]' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:13: error: 'int a [101][101]' previously declared here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:25: error: redefinition of 'int x' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:25: error: 'int x' previously declared here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:27: error: redefinition of 'int y' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:27: error: 'int y' previously declared here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:29: error: redefinition of 'int i' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:29: error: 'int i' previously defined here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp:28:33: error: redefinition of 'int j' int n,p,q,r,a[101][101],x,y,i=1,j=1; ^ lant1.cpp:6:33: error: 'int j' previously defined here int n,p,q,r,a[101][101],x,y,i=1,j=1,cnt; ^ lant1.cpp: In function 'void BFS(int)': lant1.cpp:29:6: error: redefinition of 'void BFS(int)' void BFS(int nod){ ^ lant1.cpp:7:6: error: 'void BFS(int)' previously defined here void BFS(int nod){ ^ lant1.cpp:31:1: error: 'v' was not declared in this scope v[1]=nod; ^ lant1.cpp:32:1: error: 'k' was not declared in this scope k[nod]=1; ^ lant1.cpp:36:19: error: 'b' was not declared in this scope if(k[i]==0 && b[l][i]==1) { ^ lant1.cpp: In function 'int main()': lant1.cpp:40:5: error: redefinition of 'int main()' int main() ^ lant1.cpp:18:5: error: 'int main()' previously defined here int main() ^ lant1.cpp:46:10: error: 'bfs' was not declared in this scope bfs(p); ^
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ă.