#4164
FAdaugaInainte
C++
Să se scrie o funcție C++ care inserează înainte de fiecare nod cu informația impară dublul său.
Problema | FAdaugaInainte | Operații I/O |
![]() fadaugainainte.in /fadaugainainte.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.2 MB
/
Stivă 0.2 MB
|
Id soluție | #58491915 | Utilizator | |
Fișier | fadaugainainte.cpp | Dimensiune | 483 B |
Data încărcării | 11 Iunie 2025, 10:12 | Scor / rezultat | Eroare de compilare |
fadaugainainte.cpp: In function 'void FAdaugaInainte(Nod*&)': fadaugainainte.cpp:22:12: error: 'struct Nod' has no member named 'urm' p->urm = head; ^ fadaugainainte.cpp:26:33: error: 'struct Nod' has no member named 'urm' for (Nod *u = head; u && u->urm; u = u->urm) ^ fadaugainainte.cpp:26:45: error: 'struct Nod' has no member named 'urm' for (Nod *u = head; u && u->urm; u = u->urm) ^ fadaugainainte.cpp:28:19: error: 'struct Nod' has no member named 'urm' while (u->urm && u->urm->info % 2) ^ fadaugainainte.cpp:28:29: error: 'struct Nod' has no member named 'urm' while (u->urm && u->urm->info % 2) ^ fadaugainainte.cpp:31:26: error: 'struct Nod' has no member named 'urm' p->info = u->urm->info * 2; ^ fadaugainainte.cpp:32:16: error: 'struct Nod' has no member named 'urm' p->urm = u->urm; ^ fadaugainainte.cpp:32:25: error: 'struct Nod' has no member named 'urm' p->urm = u->urm; ^ fadaugainainte.cpp:33:16: error: 'struct Nod' has no member named 'urm' u->urm = p; ^ fadaugainainte.cpp:34:20: error: 'struct Nod' has no member named 'urm' u = u->urm; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FAdaugaInainte 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ă.