#4684
FLsiThird
C++
Să se scrie o funcție care șterge fiecare al treilea nod dintr-o listă simplu înlănțuită.
Problema | FLsiThird | Operații I/O |
flsithird.in /flsithird.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51720735 | Utilizator | |
Fișier | flsithird.cpp | Dimensiune | 356 B |
Data încărcării | 08 August 2024, 16:13 | Scor / rezultat | Eroare de compilare |
flsithird.cpp: In function 'void EraseThird(nod*&)': flsithird.cpp:21:25: error: no matching function for call to 'nod::nod()' nod* node = new nod(); ^ flsithird.cpp:21:25: note: candidates are: flsithird.cpp:8:5: note: nod::nod(int) nod(int x) ^ flsithird.cpp:8:5: note: candidate expects 1 argument, 0 provided flsithird.cpp:4:8: note: constexpr nod::nod(const nod&) struct nod ^ flsithird.cpp:4:8: note: candidate expects 1 argument, 0 provided flsithird.cpp:4:8: note: constexpr nod::nod(nod&&) flsithird.cpp:4:8: note: candidate expects 1 argument, 0 provided flsithird.cpp:22:25: error: no matching function for call to 'nod::nod()' nod* prev = new nod(); ^ flsithird.cpp:22:25: note: candidates are: flsithird.cpp:8:5: note: nod::nod(int) nod(int x) ^ flsithird.cpp:8:5: note: candidate expects 1 argument, 0 provided flsithird.cpp:4:8: note: constexpr nod::nod(const nod&) struct nod ^ flsithird.cpp:4:8: note: candidate expects 1 argument, 0 provided flsithird.cpp:4:8: note: constexpr nod::nod(nod&&) flsithird.cpp:4:8: note: candidate expects 1 argument, 0 provided flsithird.cpp:30:19: error: 'struct nod' has no member named 'next' prev->next = node->next; ^ flsithird.cpp:30:32: error: 'struct nod' has no member named 'next' prev->next = node->next; ^ flsithird.cpp:31:26: error: 'struct nod' has no member named 'next' node = node->next; ^ flsithird.cpp:34:22: error: 'struct nod' has no member named 'next' node = node->next; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FLsiThird 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ă.