#1174
Să se scrie o funcție C++ care determină câte perechi de elemente prime între ele sunt memorate într-o lista simplu înlănțuită.
| Problema | FListaNumarare2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64741249 | Utilizator | |
| Fișier | flistanumarare2.cpp | Dimensiune | 240 B |
| Data încărcării | 27 Mai 2026, 09:48 | Scor/rezultat | Eroare de compilare |
flistanumarare2.cpp: In function ‘int dc(int, int)’: flistanumarare2.cpp:42:22: error: a function-definition is not allowed here before ‘{’ token 42 | int numarare(nod * p){ | ^ flistanumarare2.cpp:54:1: error: a function-definition is not allowed here before ‘{’ token 54 | { | ^ flistanumarare2.cpp:65:1: error: a function-definition is not allowed here before ‘{’ token 65 | { | ^ flistanumarare2.cpp:74:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 74 | int main() | ^~ flistanumarare2.cpp:74:9: note: remove parentheses to default-initialize a variable 74 | int main() | ^~ | -- flistanumarare2.cpp:74:9: note: or replace parentheses with braces to value-initialize a variable flistanumarare2.cpp:75:1: error: a function-definition is not allowed here before ‘{’ token 75 | { | ^ flistanumarare2.cpp:83:2: error: expected ‘}’ at end of input 83 | } | ^ flistanumarare2.cpp:39:5: note: to match this ‘{’ 39 | { | ^ flistanumarare2.cpp:83:2: error: expected ‘}’ at end of input 83 | } | ^ flistanumarare2.cpp:37:21: note: to match this ‘{’ 37 | int dc(int a, int b){ | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FListaNumarare2 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ă.