#1400
Se citește un șir cu n numere naturale. Să se verifice dacă prin rearajarea elementelor șirului se poate obține un șir palindrom.
| Problema | e_palindrom | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64198309 | Utilizator | |
| Fișier | e_palindrom.cpp | Dimensiune | 472 B |
| Data încărcării | 22 Aprilie 2026, 15:51 | Scor/rezultat | Eroare de compilare |
e_palindrom.cpp: In function ‘int main()’: e_palindrom.cpp:23:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 23 | if(app==1) | ^~ e_palindrom.cpp:24:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 24 | cout<<"DA"; return 0; | ^~~~~~ e_palindrom.cpp:25:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 25 | if(app=0) | ~~~^~ e_palindrom.cpp:25:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 25 | if(app=0) | ^~ e_palindrom.cpp:26:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 26 | cout<<"DA"; return 0; | ^~~~~~ e_palindrom.cpp:27:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 27 | if(app>=2) | ^~ e_palindrom.cpp:28:20: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 28 | cout<<"NU"; | ^ e_palindrom.cpp:28:20: error: expected ‘}’ at end of input e_palindrom.cpp:6:1: note: to match this ‘{’ 6 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema e_palindrom 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ă.