#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 | #62385612 | Utilizator | |
| Fișier | veriflant.cpp | Dimensiune | 664 B |
| Data încărcării | 20 Ianuarie 2026, 08:20 | Scor/rezultat | Eroare de compilare |
veriflant.cpp: In function 'bool lant(char, int)': veriflant.cpp:9:19: error: 'strlen' was not declared in this scope int n=strlen(s); ^ veriflant.cpp:11:15: error: invalid types 'int[int]' for array subscript if(a[i][i+1]==0) ^ veriflant.cpp: In function 'bool elementar(char)': veriflant.cpp:18:19: error: 'strlen' was not declared in this scope int n=strlen(s); ^ veriflant.cpp:21:1: error: expected primary-expression before '}' token } ^ veriflant.cpp:21:1: error: expected ';' before '}' token veriflant.cpp:17:9: warning: unused variable 'fr' [-Wunused-variable] int fr[10]={0}; ^ veriflant.cpp:21:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ veriflant.cpp: At global scope: veriflant.cpp:22:14: error: invalid types 'int[int]' for array subscript int a[101[101],lant[101][201],k; ^ veriflant.cpp:22:15: error: expected ']' before ',' token int a[101[101],lant[101][201],k; ^ veriflant.cpp:22:29: error: 'int lant [101][201]' redeclared as different kind of symbol int a[101[101],lant[101][201],k; ^ veriflant.cpp:7:6: error: previous declaration of 'bool lant(char, int)' bool lant(char s,int a) ^ veriflant.cpp: In function 'int main()': veriflant.cpp:29:9: error: 'a' was not declared in this scope a[x][y]=1; ^ veriflant.cpp:35:14: error: 'a' was not declared in this scope fin>>a[i][++k]; ^
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ă.