#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 | #64622064 | Utilizator | |
| Fișier | existaimparedivimp.cpp | Dimensiune | 547 B |
| Data încărcării | 19 Mai 2026, 08:49 | Scor/rezultat | 0 puncte |
existaimparedivimp.cpp: In function ‘int ExistaImpareDivImp(int*, int, int)’: existaimparedivimp.cpp:16:17: warning: left operand of comma operator has no effect [-Wunused-value] 16 | int s1=(v,st,m); | ^ existaimparedivimp.cpp:16:22: warning: right operand of comma operator has no effect [-Wunused-value] 16 | int s1=(v,st,m); | ^ existaimparedivimp.cpp:17:17: warning: left operand of comma operator has no effect [-Wunused-value] 17 | int s2=(v,m+1,dr); | ^ existaimparedivimp.cpp:17:20: warning: right operand of comma operator has no effect [-Wunused-value] 17 | int s2=(v,m+1,dr); | ~^~ existaimparedivimp.cpp:18:14: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] 18 | if(s1*s2) | ~~^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
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ă.