#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 | #64217529 | Utilizator | |
| Fișier | flistaverpalindrom.cpp | Dimensiune | 607 B |
| Data încărcării | 23 Aprilie 2026, 13:08 | Scor/rezultat | Eroare de compilare |
flistaverpalindrom.cpp: In function ‘bool palindrom(node*)’: flistaverpalindrom.cpp:36:17: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 36 | else if((i->next = j && i->key != j->key) || (i->next->next = j && i->key != j->key)cond=0; | ^ flistaverpalindrom.cpp:36:30: error: cannot convert ‘bool’ to ‘node*’ in assignment 36 | else if((i->next = j && i->key != j->key) || (i->next->next = j && i->key != j->key)cond=0; | ~~^~~~~~~~~~~~~~~~~~~ | | | bool flistaverpalindrom.cpp:36:73: error: cannot convert ‘bool’ to ‘node*’ in assignment 36 | else if((i->next = j && i->key != j->key) || (i->next->next = j && i->key != j->key)cond=0; | ~~^~~~~~~~~~~~~~~~~~~ | | | bool flistaverpalindrom.cpp:37:17: error: expected primary-expression before ‘else’ 37 | else break; | ^~~~ flistaverpalindrom.cpp:36:100: error: expected ‘)’ before ‘else’ 36 | else if((i->next = j && i->key != j->key) || (i->next->next = j && i->key != j->key)cond=0; | ~ ^ | ) 37 | else break; | ~~~~
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ă.