#3347
Se dă un şir format din n
numere naturale. Se calculează suma elementelor oricărui subşir al şirului dat. Să se afle câte din sumele obţinute sunt termeni ai şirului lui Fibonacci.
qwerty
Problema | Fibonacci3 | Operații I/O |
![]() fibonacci3.in /fibonacci3.out
|
---|---|---|---|
Limita timp | 1.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57800608 | Utilizator | |
Fișier | fibonacci3.cpp | Dimensiune | 1.44 KB |
Data încărcării | 17 Aprilie 2025, 11:14 | Scor / rezultat | 15 puncte |
fibonacci3.cpp: In function 'bool apartineFib(long long unsigned int)': fibonacci3.cpp:16:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (b < n) { ^ fibonacci3.cpp:21:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] return n == b; ^ fibonacci3.cpp: In function 'void mergeSort(int, int)': fibonacci3.cpp:29:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i1 <= mij && i2 <= dr) ^ fibonacci3.cpp:29:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i1 <= mij && i2 <= dr) ^ fibonacci3.cpp:33:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i2 <= dr) ^ fibonacci3.cpp:35:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while (i1 <= mij) ^ fibonacci3.cpp:37:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < l; i++) ^ fibonacci3.cpp: In function 'void submultimi(long long unsigned int*, int)': fibonacci3.cpp:47:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (poz < n) { ^ fibonacci3.cpp:48:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = poz; i < n; i++) ^ fibonacci3.cpp: In function 'int main()': fibonacci3.cpp:62:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < n; i++) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 3 | 3 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
3 | 0 secunde | OK. | 3 | 3 | ||
4 | 0 secunde | OK. | 3 | 3 | ||
5 | 0 secunde | OK. | 3 | 3 | ||
6 | 0 secunde | OK. | 3 | 3 | ||
7 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
11 | 0 secunde | Raspuns gresit. | 3 | 0 | ||
12 | 0.024 secunde | Raspuns gresit. | 3 | 0 | ||
13 | 0.004 secunde | Raspuns gresit. | 3 | 0 | ||
14 | 0.2 secunde | Raspuns gresit. | 3 | 0 | ||
15 | 0.012 secunde | Raspuns gresit. | 3 | 0 | ||
16 | 0.02 secunde | Raspuns gresit. | 3 | 0 | ||
17 | 0.044 secunde | Raspuns gresit. | 3 | 0 | ||
18 | 0.112 secunde | Raspuns gresit. | 3 | 0 | ||
19 | 0.232 secunde | Raspuns gresit. | 3 | 0 | ||
20 | 0.572 secunde | Raspuns gresit. | 3 | 0 | ||
21 | 0.864 secunde | Raspuns gresit. | 3 | 0 | ||
22 | Depășit | Limita de timp depășită | 3 | 0 | ||
23 | Depășit | Limita de timp depășită | 3 | 0 | ||
24 | Depășit | Limita de timp depășită | 3 | 0 | ||
25 | Depășit | Limita de timp depășită | 3 | 0 | ||
26 | Depășit | Limita de timp depășită | 3 | 0 | ||
27 | Depășit | Limita de timp depășită | 3 | 0 | ||
28 | Depășit | Limita de timp depășită | 3 | 0 | ||
29 | 0.148 secunde | Raspuns gresit. | 3 | 0 | ||
30 | 1.34 secunde | Raspuns gresit. | 3 | 0 | ||
31 | Depășit | Limita de timp depășită | 3 | 0 | ||
32 | Depășit | Limita de timp depășită | 3 | 0 | ||
33 | Depășit | Limita de timp depășită | 4 | 0 | ||
Punctaj total | 15 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Fibonacci3 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ă.