#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 | #34413759 | Utilizator | |
Fișier | lanturi.cpp | Dimensiune | 2.64 KB |
Data încărcării | 01 Februarie 2022, 14:47 | Scor / rezultat | Eroare de compilare |
lanturi.cpp: In function 'int main()': lanturi.cpp:60:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses] }while(!(as and ev or !as)); ^ lanturi.cpp: At global scope: lanturi.cpp:84:13: error: redefinition of 'std::ifstream cin' ifstream cin("lanturi.in"); ^ lanturi.cpp:3:10: error: 'std::ifstream cin' previously declared here ifstream cin("lantmaxim.in"); ^ lanturi.cpp:85:14: error: redefinition of 'std::ofstream cout' ofstream cout("lanturi.out"); ^ lanturi.cpp:4:10: error: 'std::ofstream cout' previously declared here ofstream cout("lantmaxim.out"); ^ lanturi.cpp:86:5: error: redefinition of 'int n' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:5: error: 'int n' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:12: error: redefinition of 'int st [21]' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:7: error: 'int st [21]' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:14: error: redefinition of 'int k' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:14: error: 'int k' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:16: error: redefinition of 'int as' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:16: error: 'int as' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:19: error: redefinition of 'int ev' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:19: error: 'int ev' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:22: error: redefinition of 'int x' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:22: error: 'int x' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:24: error: redefinition of 'int m' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:24: error: 'int m' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:26: error: redefinition of 'int z' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:26: error: 'int z' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:36: error: redefinition of 'int a [21][21]' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:28: error: 'int a [21][21]' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:38: error: redefinition of 'int i' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:38: error: 'int i' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:40: error: redefinition of 'int j' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:40: error: 'int j' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:44: error: redefinition of 'int p' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:42: error: 'int p' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:46: error: redefinition of 'int q' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:44: error: 'int q' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:53: error: redefinition of 'int vc [21]' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:46: error: 'int vc [21]' previously declared here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp:86:55: error: redefinition of 'int mx' int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,r,p,q,vc[21],mx=0; ^ lanturi.cpp:5:53: error: 'int mx' previously defined here int n,st[21],k,as,ev,x,m,z,a[21][21],i,j,p,q,vc[21],mx=0; ^ lanturi.cpp: In function 'void init()': lanturi.cpp:87:6: error: redefinition of 'void init()' void init() ^ lanturi.cpp:6:6: error: 'void init()' previously defined here void init() ^ lanturi.cpp: In function 'int succesor()': lanturi.cpp:91:5: error: redefinition of 'int succesor()' int succesor() ^ lanturi.cpp:10:5: error: 'int succesor()' previously defined here int succesor() ^ lanturi.cpp: In function 'int valid()': lanturi.cpp:101:5: error: redefinition of 'int valid()' int valid() ^ lanturi.cpp:20:5: error: 'int valid()' previously defined here int valid() ^ lanturi.cpp: In function 'int solutie()': lanturi.cpp:110:5: error: redefinition of 'int solutie()' int solutie() ^ lanturi.cpp:29:5: error: 'int solutie()' previously defined here int solutie() ^ lanturi.cpp: In function 'void tipar()': lanturi.cpp:120:6: error: redefinition of 'void tipar()' void tipar() ^ lanturi.cpp:33:6: error: 'void tipar()' previously defined here void tipar() ^ lanturi.cpp: In function 'int main()': lanturi.cpp:126:5: error: redefinition of 'int main()' int main() ^ lanturi.cpp:39:5: error: 'int main()' previously defined here int main() ^ lanturi.cpp:147:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses] }while(!(as and ev or !as)); ^
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ă.