#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 | #58325432 | Utilizator | |
Fișier | veriflant.cpp | Dimensiune | 580 B |
Data încărcării | 27 Mai 2025, 11:57 | Scor / rezultat | Eroare de compilare |
veriflant.cpp: In function 'int main()': veriflant.cpp:8:9: error: 'n' was not declared in this scope cin>>n>>m; ^ veriflant.cpp:8:12: error: 'm' was not declared in this scope cin>>n>>m; ^ veriflant.cpp:9:8: error: 'i' was not declared in this scope for(i=1;i<=m;i++){ ^ veriflant.cpp:10:13: error: 'x' was not declared in this scope cin>>x>>y; ^ veriflant.cpp:10:16: error: 'y' was not declared in this scope cin>>x>>y; ^ veriflant.cpp:11:8: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ veriflant.cpp:14:9: error: 'k' was not declared in this scope cin>>k; ^ veriflant.cpp:15:8: error: 'i' was not declared in this scope for(i=1;i<=k;i++){ ^ veriflant.cpp:17:13: error: 'nrsir' was not declared in this scope cin>>nrsir; ^ veriflant.cpp:18:12: error: 'j' was not declared in this scope for(j=1;j<=nrsir;j++){ ^ veriflant.cpp:19:17: error: 'x' was not declared in this scope cin>>x; ^ veriflant.cpp:20:12: error: 'fsir' was not declared in this scope fsir[x]++; ^ veriflant.cpp:21:12: error: 'sir' was not declared in this scope sir[j]=x; ^ veriflant.cpp:24:12: error: 'j' was not declared in this scope for(j=1;j<=n-1;j++){ ^ veriflant.cpp:25:13: error: 'a' was not declared in this scope if(a[sir[j]][sir[j+1]] == 0) ^ veriflant.cpp:25:15: error: 'sir' was not declared in this scope if(a[sir[j]][sir[j+1]] == 0) ^ veriflant.cpp:26:10: error: 'nu' was not declared in this scope nu=true; ^ veriflant.cpp:27:13: error: 'fsir' was not declared in this scope if(fsir[sir[j]] > 1) ^ veriflant.cpp:27:18: error: 'sir' was not declared in this scope if(fsir[sir[j]] > 1) ^ veriflant.cpp:28:10: error: 'nel' was not declared in this scope nel=true; ^ veriflant.cpp:31:11: error: 'nu' was not declared in this scope if(nu) cout<<"NU"<<endl; ^ veriflant.cpp:32:16: error: 'nel' was not declared in this scope else if(nel) <<cout ^ veriflant.cpp:32:21: error: expected primary-expression before '<<' token else if(nel) <<cout ^ veriflant.cpp:33:4: error: expected ';' before '}' token } ^
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ă.