#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57757051 | Utilizator | |
Fișier | flistanumarare2.cpp | Dimensiune | 293 B |
Data încărcării | 14 Aprilie 2025, 18:08 | Scor / rezultat | 0 puncte |
flistanumarare2.cpp: In function 'int numarare(nod*)': flistanumarare2.cpp:60:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ flistanumarare2.cpp:42:14: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized] p->info=x; ^ flistanumarare2.cpp:47:13: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized] while(x*y!=0) ^ flistanumarare2.cpp:45:10: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized] y=x%y; ^ flistanumarare2.cpp: In function 'int main()': flistanumarare2.cpp:42:14: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized] p->info=x; ^ flistanumarare2.cpp:40:5: note: 'x' was declared here int x,y,r; ^ flistanumarare2.cpp:47:13: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized] while(x*y!=0) ^ flistanumarare2.cpp:40:9: note: 'r' was declared here int x,y,r; ^ flistanumarare2.cpp:45:10: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized] y=x%y; ^ flistanumarare2.cpp:40:7: note: 'y' was declared here int x,y,r; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Caught fatal signal 8 | 20 | 0 | Exemplu | |
2 | 0 secunde | Caught fatal signal 8 | 40 | 0 | ||
3 | 0 secunde | Caught fatal signal 8 | 40 | 0 | ||
Punctaj total | 0 |
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ă.