#475
Lant
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 | #28882886 | Utilizator | |
Fișier | lant.cpp | Dimensiune | 730 B |
Data încărcării | 22 Martie 2021, 15:14 | Scor / rezultat | Eroare de compilare |
lant.cpp: In function 'void afisare()': lant.cpp:10:15: warning: unused variable 'j' [-Wunused-variable] int n, i, j; ^ lant.cpp: In function 'void backtrack(int)': lant.cpp:17:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ lant.cpp:17:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ lant.cpp:19:41: error: expected ')' before numeric constant if(b[i]==false && a[i], v[p-1]--1 && a[v[p-1]][i]==1) ^ lant.cpp:23:22: error: 'q' was not declared in this scope if(v[p]==q) afisare(p); ^ lant.cpp:23:34: error: too many arguments to function 'void afisare()' if(v[p]==q) afisare(p); ^ lant.cpp:8:6: note: declared here void afisare() ^ lant.cpp: In function 'int main()': lant.cpp:31:10: error: 'n' was not declared in this scope fin>>n>>m; ^ lant.cpp:31:13: error: 'm' was not declared in this scope fin>>n>>m; ^ lant.cpp:32:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ lant.cpp:33:14: error: 'x' was not declared in this scope fin>>x>>y; ^ lant.cpp:33:17: error: 'y' was not declared in this scope fin>>x>>y; ^ lant.cpp:34:7: error: 'x' was not declared in this scope a[x][y]=a[y][x]=1; ^ lant.cpp:34:10: error: 'y' was not declared in this scope a[x][y]=a[y][x]=1; ^ lant.cpp:35:10: error: 'P' was not declared in this scope fin>>P>>q; ^ lant.cpp:35:13: error: 'q' was not declared in this scope fin>>P>>q; ^ lant.cpp:36:10: error: 'p' was not declared in this scope v[1]=p; ^
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ă.