#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58041600 | Utilizator | |
Fișier | existaprimedivimp.cpp | Dimensiune | 777 B |
Data încărcării | 10 Mai 2025, 13:57 | Scor / rezultat | Eroare de compilare |
existaprimedivimp.cpp: In function 'bool exista_prime(int*, int, int)': existaprimedivimp.cpp:23:9: error: 'reurn' was not declared in this scope reurn exista_prime(a, st, mij) || exista_prime(a, mij + 1, dr); ^ existaprimedivimp.cpp:23:15: error: expected ';' before 'exista_prime' reurn exista_prime(a, st, mij) || exista_prime(a, mij + 1, dr); ^ existaprimedivimp.cpp:22:13: warning: unused variable 'mij' [-Wunused-variable] int mij = (st + dr) / 2; ^ existaprimedivimp.cpp: In function 'int main()': existaprimedivimp.cpp:39:5: error: 'rerurn' was not declared in this scope rerurn 0; ^ existaprimedivimp.cpp:39:12: error: expected ';' before numeric constant rerurn 0; ^ existaprimedivimp.cpp: In function 'bool exista_prime(int*, int, int)': existaprimedivimp.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
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ă.