#2276
Se consideră un șir a[1]
, a[2]
, …, a[n]
de numere naturale. Se dau și T
intervale închise de forma [x, y]
, cu x ≤ y
. Pentru fiecare din cele T
intervale de forma [x, y]
trebuie să răspundeți la întrebarea: câte numere din șir aparțin intervalului [x, y]
?
-
Problema | cb | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57640310 | Utilizator | |
Fișier | cb.cpp | Dimensiune | 983 B |
Data încărcării | 08 Aprilie 2025, 17:31 | Scor / rezultat | 0 puncte |
cb.cpp: In function 'int cb(int)': cb.cpp:16:11: warning: statement has no effect [-Wunused-value] { m-(st+dr)/2; ^ cb.cpp:22:19: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized] dr=m-1; ^ cb.cpp: In function 'int main()': cb.cpp:22:19: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized] cb.cpp:14:19: note: 'm' was declared here int st=1,dr=n,m; ^ cb.cpp:22:19: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized] dr=m-1; ^ cb.cpp:14:19: note: 'm' was declared here int st=1,dr=n,m; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
2 | 0.008 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0.024 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0.072 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0.296 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0.284 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0.404 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0.548 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0.488 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cb 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ă.