#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 | #55982628 | Utilizator | |
Fișier | lant.cpp | Dimensiune | 776 B |
Data încărcării | 01 Februarie 2025, 19:39 | Scor / rezultat | Eroare de compilare |
lant.cpp:5:37: error: conflicting declaration 'int x [22]' int n , m , x , y , a[22][22] , x[22] , v[22] , p , q; ^ lant.cpp:5:13: error: 'x' has a previous declaration as 'int x' int n , m , x , y , a[22][22] , x[22] , v[22] , p , q; ^ lant.cpp: In function 'void afis(int)': lant.cpp:10:17: error: invalid types 'int[int]' for array subscript out<<x[i]<<" "; ^ lant.cpp: In function 'void backt(int)': lant.cpp:20:16: error: invalid types 'int[int]' for array subscript x[k]=i; ^ lant.cpp:21:25: error: two consecutive '[' shall only introduce an attribute before '[' token if(k==1 || a[[k-1]][x[k]]==1) ^ lant.cpp:21:25: error: expected ')' before '[' token lant.cpp:23:23: error: invalid types 'int[int]' for array subscript if(x[k]==q) ^ lant.cpp: In lambda function: lant.cpp:27:16: error: expected '{' before '=' token [i]=0; ^ lant.cpp: In function 'void backt(int)': lant.cpp:27:16: error: no match for 'operator=' (operand types are 'backt(int)::__lambda0' and 'int') lant.cpp:27:16: note: candidate is: lant.cpp:27:15: note: backt(int)::__lambda0& backt(int)::__lambda0::operator=(const backt(int)::__lambda0&) <deleted> [i]=0; ^ lant.cpp:27:15: note: no known conversion for argument 1 from 'int' to 'const backt(int)::__lambda0&' lant.cpp: In function 'int main()': lant.cpp:42:8: error: invalid types 'int[int]' for array subscript x[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ă.