#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 | #64198253 | Utilizator | |
| Fișier | e_palindrom.cpp | Dimensiune | 436 B |
| Data încărcării | 22 Aprilie 2026, 15:48 | Scor/rezultat | 0 puncte |
e_palindrom.cpp: In function ‘int main()’: e_palindrom.cpp:21:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 21 | if(app==1) | ^~ e_palindrom.cpp:22:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 22 | cout<<"DA"; return 0; | ^~~~~~ e_palindrom.cpp:23:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 23 | if(app=0) | ~~~^~ e_palindrom.cpp:23:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 23 | if(app=0) | ^~ 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:18:16: warning: ‘app’ may be used uninitialized [-Wmaybe-uninitialized] 18 | app++; | ~~~^~ e_palindrom.cpp:7:11: note: ‘app’ was declared here 7 | int n,app,i,a; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.002 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 3 | 0.002 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 4 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 5 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 0 | |||||
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ă.