#4166
Să se scrie o funcție C++ care verifică dacă informațiile reținute în primele n/2 noduri formează un șir identic cu informațiile din ultimele n/2 noduri.
| Problema | FLsiDublu | Operații I/O |
flsidublu.in/flsidublu.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 1 MB
/
Stivă 1 MB
|
| Id soluție | #64371185 | Utilizator | |
| Fișier | flsidublu.cpp | Dimensiune | 515 B |
| Data încărcării | 04 Mai 2026, 09:12 | Scor/rezultat | 40 puncte |
flsidublu.cpp: In function ‘int FLsiDublu(Nod*)’: flsidublu.cpp:19:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 19 | if(n%2!=0) | ^~ flsidublu.cpp:21:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 21 | Nod*q=head; | ^~~ flsidublu.cpp:23:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 23 | for(int i=1;i<=n/2;i++) | ^~~ flsidublu.cpp:25:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 25 | Nod*temp=head; | ^~~ flsidublu.cpp:29:22: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 29 | for(int i=1;i=n/2;i++) | ~^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 0 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 1 | 0.001 secunde | OK. | 10 | 10 | ||
| 2 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.001 secunde | OK. | 10 | 10 | ||
| 7 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 40 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FLsiDublu 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ă.