#1256
Sa se verifice dacă o listă simplu înlănțuită formează un palindrom.
| Problema | FListaVerPalindrom | Operații I/O |
flistaverpalindrom.in/flistaverpalindrom.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 4 MB
|
| Id soluție | #64178215 | Utilizator | |
| Fișier | flistaverpalindrom.cpp | Dimensiune | 336 B |
| Data încărcării | 21 Aprilie 2026, 19:10 | Scor/rezultat | Eroare de compilare |
flistaverpalindrom.cpp:24:8: error: redefinition of ‘struct node’ 24 | struct node { | ^~~~ flistaverpalindrom.cpp:9:8: note: previous definition of ‘struct node’ 9 | struct node { | ^~~~ flistaverpalindrom.cpp: In function ‘bool palindrom(node*)’: flistaverpalindrom.cpp:35:18: error: too few arguments to function ‘int strcmp(const char*, const char*)’ 35 | if(strcmp()) | ~~~~~~^~ In file included from /usr/include/c++/13/cstring:42, from flistaverpalindrom.cpp:22: /usr/include/string.h:156:12: note: declared here 156 | extern int strcmp (const char *__s1, const char *__s2) | ^~~~~~ flistaverpalindrom.cpp:36:5: error: expected primary-expression before ‘}’ token 36 | } | ^ flistaverpalindrom.cpp:37:14: error: too few arguments to function ‘int strcmp(const char*, const char*)’ 37 | if(strcmp()) | ~~~~~~^~ /usr/include/string.h:156:12: note: declared here 156 | extern int strcmp (const char *__s1, const char *__s2) | ^~~~~~ flistaverpalindrom.cpp:39:1: error: expected primary-expression before ‘}’ token 39 | } | ^ flistaverpalindrom.cpp:29:11: warning: unused variable ‘st’ [-Wunused-variable] 29 | node *st=l; | ^~ flistaverpalindrom.cpp:31:10: warning: unused variable ‘abatere’ [-Wunused-variable] 31 | bool abatere=1; | ^~~~~~~ flistaverpalindrom.cpp:39:1: warning: no return statement in function returning non-void [-Wreturn-type] 39 | } | ^ flistaverpalindrom.cpp: At global scope: flistaverpalindrom.cpp:46:5: error: redefinition of ‘int main()’ 46 | int main(void) { | ^~~~ flistaverpalindrom.cpp:40:5: note: ‘int main()’ previously defined here 40 | int main() | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FListaVerPalindrom face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.