#4685
Scrieți o funcție care va șterge dintr-o listă dublu înlănțuită primul nod care memorează valoarea A și ultimul nod care memorează valoarea B.
| Problema | LdiStergeAB | Operații I/O |
ldistergeab.in/ldistergeab.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #59044429 | Utilizator | |
| Fișier | ldistergeab.cpp | Dimensiune | 990 B |
| Data încărcării | 15 Septembrie 2025, 21:44 | Scor/rezultat | 20 puncte |
ldistergeab.cpp: In function 'void StergeAB(nod*&, nod*&, int, int)': ldistergeab.cpp:21:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q=prim) ^ ldistergeab.cpp:22:26: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q->info=A) ^ ldistergeab.cpp:25:24: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q=ultim) ^ ldistergeab.cpp:26:30: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q->info=A) ^ ldistergeab.cpp:29:30: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q->info=A) ^ ldistergeab.cpp:25:16: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (q=ultim) ^ ldistergeab.cpp:21:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (q=prim) ^ ldistergeab.cpp:35:20: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q=ultim) ^ ldistergeab.cpp:36:26: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q->info=B) ^ ldistergeab.cpp:39:23: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q=prim) ^ ldistergeab.cpp:40:30: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q->info=B) ^ ldistergeab.cpp:43:30: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (q->info=B) ^ ldistergeab.cpp:39:16: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (q=prim) ^ ldistergeab.cpp:35:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if (q=ultim) ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0 secunde | OK. | 10 | 10 | ||
| 5 | 0 secunde | OK. | 10 | 10 | ||
| 6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| 10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LdiStergeAB 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ă.