#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 | #64774901 | Utilizator | |
| Fișier | veriflant.cpp | Dimensiune | 1.03 KB |
| Data încărcării | 29 Mai 2026, 13:12 | Scor/rezultat | Eroare de compilare |
veriflant.cpp:42:32: error: stray ‘\’ in program 42 | fout<<"ELEMENTAR"\n; | ^ veriflant.cpp:44:34: error: stray ‘\’ in program 44 | fout<<"NEELEMENTAR"\n; | ^ veriflant.cpp: In function ‘int lant(int*, int)’: veriflant.cpp:9:14: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(int i=1;i<k;i++) | ^~~ veriflant.cpp:12:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | return 1; | ^~~~~~ veriflant.cpp: In function ‘int elementar(int*, int)’: veriflant.cpp:17:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for(int i=1;i<k;i++) | ^~~ veriflant.cpp:20:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | return 1; | ^~~~~~ veriflant.cpp: In function ‘int main()’: veriflant.cpp:42:32: error: expected ‘;’ before ‘n’ 42 | fout<<"ELEMENTAR"\n; | ^~ | ; veriflant.cpp:44:34: error: expected ‘;’ before ‘n’ 44 | fout<<"NEELEMENTAR"\n; | ^~ | ;
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ă.