#474
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și o succesiune de k
vârfuri. Să se verifice dacă vârfurile din succesiune formează un lanț.
Problema | VerifLant | Operații I/O |
![]() veriflant.in /veriflant.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55844314 | Utilizator | |
Fișier | veriflant.cpp | Dimensiune | 738 B |
Data încărcării | 28 Ianuarie 2025, 12:47 | Scor / rezultat | Eroare de compilare |
veriflant.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream("veriflant.out") ^ veriflant.cpp: In function 'int lant(int, int*)': veriflant.cpp:10:21: error: 'n' was not declared in this scope for(int i=1; i<=n; i++) ^ veriflant.cpp:11:12: error: 'a' was not declared in this scope if(a[v[i][v[i+1]]==0) ^ veriflant.cpp:11:25: error: invalid types 'int[int]' for array subscript if(a[v[i][v[i+1]]==0) ^ veriflant.cpp:11:29: error: expected ']' before ')' token if(a[v[i][v[i+1]]==0) ^ veriflant.cpp: In function 'int main()': veriflant.cpp:26:8: error: 'n' was not declared in this scope in>>n>>m; ^ veriflant.cpp:26:11: error: 'm' was not declared in this scope in>>n>>m; ^ veriflant.cpp:28:9: error: 'x' was not declared in this scope in>>x>>y; ^ veriflant.cpp:28:12: error: 'y' was not declared in this scope in>>x>>y; ^ veriflant.cpp:29:4: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1;} ^ veriflant.cpp:30:8: error: 'k' was not declared in this scope in>>k; ^ veriflant.cpp:32:9: error: 'p' was not declared in this scope in>>p; ^ veriflant.cpp:34:9: error: 'v' was not declared in this scope in>>v[i]; ^ veriflant.cpp:36:12: error: 'p' was not declared in this scope if(lant(p,v)==0) out<<"NU"; ^ veriflant.cpp:36:14: error: 'v' was not declared in this scope if(lant(p,v)==0) out<<"NU"; ^ veriflant.cpp:36:21: error: 'out' was not declared in this scope if(lant(p,v)==0) out<<"NU"; ^ veriflant.cpp:37:26: error: 'out' was not declared in this scope else if(lant(p,v)==1)out<<"ELEMENTAR"; ^ veriflant.cpp:38:9: error: 'out' was not declared in this scope else out<<"NEELEMENTAR"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifLant 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ă.