#1149
ExistaPrimeDivImp
Se dă un şir cu n
elemente, numere naturale. Folosind metoda Divide et Impera să se verifice dacă în șir există elemente prime.
Problema | ExistaPrimeDivImp | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50252270 | Utilizator | |
Fișier | existaprimedivimp.cpp | Dimensiune | 711 B |
Data încărcării | 02 Aprilie 2024, 11:42 | Scor / rezultat | 50 puncte |
existaprimedivimp.cpp: In function 'int ExistaPrimeDivImp(int*, int, int)': existaprimedivimp.cpp:13:3: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(st==dr) ^ existaprimedivimp.cpp:25:17: warning: control reaches end of non-void function [-Wreturn-type] return 1;} ^ existaprimedivimp.cpp:6:13: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized] if(x%i==0) ^ existaprimedivimp.cpp:12:11: note: 'a' was declared here int m,a,b; ^ existaprimedivimp.cpp:6:13: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized] if(x%i==0) ^ existaprimedivimp.cpp:12:13: note: 'b' was declared here int m,a,b; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 20 | 20 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 30 | 0 | ||
4 | 0 secunde | OK. | 30 | 30 | ||
Punctaj total | 50 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ExistaPrimeDivImp face parte din prima categorie. 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ă.