#4683
Să se scrie o funcție ce va crea o listă simplu înlănțuită care să memoreze în nodurile sale cele n numere întregi din vector, în ordinea în care se află în a. Pointerul head va memora în final adresa primului nod din listă.
| Problema | FLsiMakeList | Operații I/O |
flsimakelist.in/flsimakelist.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63903433 | Utilizator | |
| Fișier | flsimakelist.cpp | Dimensiune | 1.11 KB |
| Data încărcării | 25 Martie 2026, 16:21 | Scor/rezultat | Eroare de compilare |
flsimakelist.cpp:14:1: error: stray '\304' in program Se consideră o listă liniară simplu înlănțuită, alocată dinamic, în care elementele sunt de tipul declarat mai jos: ^ flsimakelist.cpp:14:1: error: stray '\203' in program flsimakelist.cpp:14:1: error: stray '\304' in program flsimakelist.cpp:14:1: error: stray '\203' in program flsimakelist.cpp:14:1: error: stray '\304' in program flsimakelist.cpp:14:1: error: stray '\203' in program flsimakelist.cpp:14:1: error: stray '\303' in program flsimakelist.cpp:14:1: error: stray '\256' in program flsimakelist.cpp:14:1: error: stray '\304' in program flsimakelist.cpp:14:1: error: stray '\203' in program flsimakelist.cpp:14:1: error: stray '\310' in program flsimakelist.cpp:14:1: error: stray '\233' in program flsimakelist.cpp:14:1: error: stray '\304' in program flsimakelist.cpp:14:1: error: stray '\203' in program flsimakelist.cpp:14:1: error: stray '\304' in program flsimakelist.cpp:14:1: error: stray '\203' in program flsimakelist.cpp:14:1: error: stray '\303' in program flsimakelist.cpp:14:1: error: stray '\256' in program flsimakelist.cpp:21:1: error: stray '\303' in program Câmpul info memorează un număr întreg, iar câmpul urm memorează adresa următorului element al listei. ^ flsimakelist.cpp:21:1: error: stray '\242' in program flsimakelist.cpp:21:1: error: stray '\304' in program flsimakelist.cpp:21:1: error: stray '\203' in program flsimakelist.cpp:21:1: error: stray '\304' in program flsimakelist.cpp:21:1: error: stray '\203' in program flsimakelist.cpp:21:1: error: stray '\303' in program flsimakelist.cpp:21:1: error: stray '\256' in program flsimakelist.cpp:21:1: error: stray '\303' in program flsimakelist.cpp:21:1: error: stray '\242' in program flsimakelist.cpp:21:1: error: stray '\304' in program flsimakelist.cpp:21:1: error: stray '\203' in program flsimakelist.cpp:21:1: error: stray '\304' in program flsimakelist.cpp:21:1: error: stray '\203' in program flsimakelist.cpp:23:1: error: stray '\305' in program Cerinţa ^ flsimakelist.cpp:23:1: error: stray '\243' in program flsimakelist.cpp:24:1: error: stray '\304' in program Se dă o listă care memorează numere întregi distincte. Adresa listei este memorată în pointerul head. Să se scrie o funcție C++ cu următorul antet: ^ flsimakelist.cpp:24:1: error: stray '\203' in program flsimakelist.cpp:24:1: error: stray '\304' in program flsimakelist.cpp:24:1: error: stray '\203' in program flsimakelist.cpp:24:1: error: stray '\304' in program flsimakelist.cpp:24:1: error: stray '\203' in program flsimakelist.cpp:24:1: error: stray '\303' in program flsimakelist.cpp:24:1: error: stray '\256' in program flsimakelist.cpp:24:1: error: stray '\304' in program flsimakelist.cpp:24:1: error: stray '\203' in program flsimakelist.cpp:24:1: error: stray '\303' in program flsimakelist.cpp:24:1: error: stray '\256' in program flsimakelist.cpp:24:1: error: stray '\304' in program flsimakelist.cpp:24:1: error: stray '\203' in program flsimakelist.cpp:24:1: error: stray '\310' in program flsimakelist.cpp:24:1: error: stray '\233' in program flsimakelist.cpp:24:1: error: stray '\304' in program flsimakelist.cpp:24:1: error: stray '\203' in program flsimakelist.cpp:27:1: error: stray '\304' in program Vectorul a memorează n numere întregi și este indexat de la 0 la n-1. Funcția va crea o listă simplu înlănțuită care să memoreze în nodurile sale cele n numere întregi din vector, în ordinea în care se află în a. Pointerul head va memora în final adresa primului nod din listă. ^ flsimakelist.cpp:27:1: error: stray '\203' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\310' in program flsimakelist.cpp:27:1: error: stray '\231' in program flsimakelist.cpp:27:1: error: stray '\310' in program flsimakelist.cpp:27:1: error: stray '\233' in program flsimakelist.cpp:27:1: error: stray '\304' in program flsimakelist.cpp:27:1: error: stray '\203' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\304' in program flsimakelist.cpp:27:1: error: stray '\203' in program flsimakelist.cpp:27:1: error: stray '\310' in program flsimakelist.cpp:27:1: error: stray '\233' in program flsimakelist.cpp:27:1: error: stray '\304' in program flsimakelist.cpp:27:1: error: stray '\203' in program flsimakelist.cpp:27:1: error: stray '\304' in program flsimakelist.cpp:27:1: error: stray '\203' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\304' in program flsimakelist.cpp:27:1: error: stray '\203' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\303' in program flsimakelist.cpp:27:1: error: stray '\256' in program flsimakelist.cpp:27:1: error: stray '\304' in program flsimakelist.cpp:27:1: error: stray '\203' in program flsimakelist.cpp:29:1: error: stray '\305' in program Restricţii şi precizări ^ flsimakelist.cpp:29:1: error: stray '\243' in program flsimakelist.cpp:29:1: error: stray '\305' in program flsimakelist.cpp:29:1: error: stray '\237' in program flsimakelist.cpp:29:1: error: stray '\304' in program flsimakelist.cpp:29:1: error: stray '\203' in program flsimakelist.cpp:30:1: error: stray '\342' in program 1 ≤ n ≤ 100 ^ flsimakelist.cpp:30:1: error: stray '\211' in program flsimakelist.cpp:30:1: error: stray '\244' in program flsimakelist.cpp:30:1: error: stray '\342' in program flsimakelist.cpp:30:1: error: stray '\211' in program flsimakelist.cpp:30:1: error: stray '\244' in program flsimakelist.cpp:32:1: error: stray '\304' in program Dacă a = 1,2,3,4,5, atunci după apelul funcției head = 1,2,3,4,5. ^ flsimakelist.cpp:32:1: error: stray '\203' in program flsimakelist.cpp:32:1: error: stray '\304' in program flsimakelist.cpp:32:1: error: stray '\203' in program flsimakelist.cpp:32:1: error: stray '\310' in program flsimakelist.cpp:32:1: error: stray '\233' in program flsimakelist.cpp:35:1: error: stray '\305' in program Soluţia propusă va conţine definiţia funcţiei cerute. Prezenţa în soluţie a altor instrucţiuni poate duce erori de compilare sau de execuţie care vor avea ca efect depunctarea soluţiei. ^ flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\304' in program flsimakelist.cpp:35:1: error: stray '\203' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\303' in program flsimakelist.cpp:35:1: error: stray '\256' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:35:1: error: stray '\305' in program flsimakelist.cpp:35:1: error: stray '\243' in program flsimakelist.cpp:14:1: error: 'Se' does not name a type Se consideră o listă liniară simplu înlănțuită, alocată dinamic, în care elementele sunt de tipul declarat mai jos: ^ flsimakelist.cpp:21:1: error: 'C' does not name a type Câmpul info memorează un număr întreg, iar câmpul urm memorează adresa următorului element al listei. ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FLsiMakeList 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ă.