#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 | #63964276 | Utilizator | |
| Fișier | veriflant.cpp | Dimensiune | 914 B |
| Data încărcării | 31 Martie 2026, 08:33 | Scor/rezultat | Eroare de compilare |
veriflant.cpp:40:19: warning: character constant too long for its type [enabled by default] fout<<'ELEMENTAR'; ^ veriflant.cpp:41:20: warning: character constant too long for its type [enabled by default] else fout<<'NEELEMENTAR'; ^ veriflant.cpp:42:20: warning: multi-character character constant [-Wmultichar] else fout<<'NU'; ^ veriflant.cpp: In function 'int lant(int*, int)': veriflant.cpp:8:18: warning: left operand of comma operator has no effect [-Wunused-value] for(int i=1;i<p,i++) ^ veriflant.cpp:8:24: error: expected ';' before ')' token for(int i=1;i<p,i++) ^ veriflant.cpp:9:12: error: 'a' was not declared in this scope if(a[v[i]][v[i+1]==0) ^ veriflant.cpp:9:29: error: expected ']' before ')' token if(a[v[i]][v[i+1]==0) ^ veriflant.cpp:10:16: error: 'o' was not declared in this scope return o; ^ veriflant.cpp: In function 'int elementar(int*, int)': veriflant.cpp:18:24: error: 'o' was not declared in this scope return o; ^ veriflant.cpp: In function 'int main()': veriflant.cpp:32:10: error: 'kk' was not declared in this scope fin>>kk; ^ veriflant.cpp:33:16: error: 'k' was not declared in this scope for(i=1;i<=k;i++) ^ veriflant.cpp:35:14: error: 'p' was not declared in this scope fin>>p; ^ veriflant.cpp:37:18: error: 'v' was not declared in this scope fin>>v[j]; ^ veriflant.cpp:38:17: error: 'v' was not declared in this scope if(lant(v,p)==1) ^
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ă.