#1350
Se consideră un şir cu elemente numere naturale nenule. Să se afle câte secvenţe din şir au produsul mai mic decât un număr dat.
| Problema | produs2 | Operații I/O |
produs2.in/produs2.out
|
|---|---|---|---|
| Limita timp | 1.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62258892 | Utilizator | |
| Fișier | produs2.cpp | Dimensiune | 712 B |
| Data încărcării | 15 Ianuarie 2026, 10:39 | Scor/rezultat | 20 puncte |
produs2.cpp: In function 'int main()': produs2.cpp:23:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(flag0 == 0 && prod<p){ ^ produs2.cpp:29:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=i;j<n&&prod*v.at(j)<p;j++){ ^ produs2.cpp:12:32: warning: unused variable 'x2' [-Wunused-variable] int n,p,s=0,i,j,flag0=0,x1,x2; ^
| 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. | 20 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.008 secunde | Raspuns gresit. | 5 | 0 | ||
| 6 | 0.024 secunde | Raspuns gresit. | 5 | 0 | ||
| 7 | 0.072 secunde | Raspuns gresit. | 5 | 0 | ||
| 8 | Depășit | Limita de timp depășită | 5 | 0 | ||
| Punctaj total | 20 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema produs2 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ă.