#1148
Se dă un şir cu n elemente, numere naturale. Folosind metoda Divide et Impera să se verifice dacă în şir există elemente impare.
| Problema | ExistaImpareDivImp | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64942387 | Utilizator | |
| Fișier | existaimparedivimp.cpp | Dimensiune | 447 B |
| Data încărcării | 19 Iunie 2026, 08:53 | Scor/rezultat | Eroare de compilare |
existaimparedivimp.cpp: In function ‘int divimp(int*, int, int)’: existaimparedivimp.cpp:14:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 14 | int main() | ^~ existaimparedivimp.cpp:14:9: note: remove parentheses to default-initialize a variable 14 | int main() | ^~ | -- existaimparedivimp.cpp:14:9: note: or replace parentheses with braces to value-initialize a variable existaimparedivimp.cpp:15:1: error: a function-definition is not allowed here before ‘{’ token 15 | { | ^ existaimparedivimp.cpp:23:2: error: expected ‘}’ at end of input 23 | } | ^ existaimparedivimp.cpp:5:1: note: to match this ‘{’ 5 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ExistaImpareDivImp 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ă.