#3963
Johnie a început să se joace cu un vector de numere. El dispune iniţial de un vector V cu N numere întregi (numerotate de la 0 la N - 1) şi poate efectua următoarele operaţii:
p cu un alt număr întreg;V inclusă între indicii a şi b;ONI 2007, clasele 11-12
| Problema | maxq | Operații I/O |
maxq.in/maxq.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 32 MB
/
Stivă 1 MB
|
| Id soluție | #62310388 | Utilizator | |
| Fișier | maxq.cpp | Dimensiune | 3.07 KB |
| Data încărcării | 16 Ianuarie 2026, 22:57 | Scor/rezultat | 65 puncte |
maxq.cpp: In constructor 'node::node()': maxq.cpp:14:9: warning: 'node::totalSum' will be initialized after [-Wreorder] int totalSum; ^ maxq.cpp:13:9: warning: 'int node::maxSum' [-Wreorder] int maxSum; ^ maxq.cpp:15:5: warning: when initialized here [-Wreorder] node() :sumInceput(0), sumEnd(0), totalSum(0),maxSum(-10000) {}; ^ maxq.cpp: In constructor 'node::node(int&)': maxq.cpp:14:9: warning: 'node::totalSum' will be initialized after [-Wreorder] int totalSum; ^ maxq.cpp:13:9: warning: 'int node::maxSum' [-Wreorder] int maxSum; ^ maxq.cpp:16:5: warning: when initialized here [-Wreorder] node(int &val) :sumInceput(val), sumEnd(val), totalSum(val),maxSum(val) {}; ^ maxq.cpp: In function 'node updateAint(int, int, int, int, int&)': maxq.cpp:58:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | OK. | 5 | 5 | ||
| 2 | 0 secunde | OK. | 5 | 5 | ||
| 3 | 0 secunde | OK. | 5 | 5 | ||
| 4 | 0 secunde | OK. | 5 | 5 | ||
| 5 | 0.12 secunde | Raspuns gresit. | 5 | 0 | ||
| 6 | 0.12 secunde | Raspuns gresit. | 5 | 0 | ||
| 7 | 0.152 secunde | Raspuns gresit. | 5 | 0 | ||
| 8 | 0.152 secunde | Raspuns gresit. | 5 | 0 | ||
| 9 | 0.188 secunde | Raspuns gresit. | 5 | 0 | ||
| 10 | 0.188 secunde | Raspuns gresit. | 5 | 0 | ||
| 11 | 0.224 secunde | OK. | 5 | 5 | ||
| 12 | 0.224 secunde | OK. | 5 | 5 | ||
| 13 | 0.236 secunde | OK. | 5 | 5 | ||
| 14 | 0.236 secunde | OK. | 5 | 5 | ||
| 15 | 0.256 secunde | OK. | 5 | 5 | ||
| 16 | 0.26 secunde | OK. | 5 | 5 | ||
| 17 | 0.26 secunde | OK. | 5 | 5 | ||
| 18 | 0.264 secunde | OK. | 5 | 5 | ||
| 19 | 0.256 secunde | Raspuns gresit. | 5 | 0 | ||
| 20 | 0.26 secunde | OK. | 5 | 5 | ||
| Punctaj total | 65 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema maxq 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ă.