#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 | #62310401 | Utilizator | |
| Fișier | maxq.cpp | Dimensiune | 3.10 KB |
| Data încărcării | 16 Ianuarie 2026, 22:58 | Scor/rezultat | 65 puncte |
maxq.cpp: In constructor 'node::node()': maxq.cpp:16:9: warning: 'node::totalSum' will be initialized after [-Wreorder] int totalSum; ^ maxq.cpp:15:9: warning: 'int node::maxSum' [-Wreorder] int maxSum; ^ maxq.cpp:17:5: warning: when initialized here [-Wreorder] node() :sumInceput(0), sumEnd(0), totalSum(0),maxSum(valmin) {}; ^ maxq.cpp: In constructor 'node::node(int&)': maxq.cpp:16:9: warning: 'node::totalSum' will be initialized after [-Wreorder] int totalSum; ^ maxq.cpp:15:9: warning: 'int node::maxSum' [-Wreorder] int maxSum; ^ maxq.cpp:18: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:60: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.124 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.192 secunde | Raspuns gresit. | 5 | 0 | ||
| 10 | 0.192 secunde | Raspuns gresit. | 5 | 0 | ||
| 11 | 0.232 secunde | OK. | 5 | 5 | ||
| 12 | 0.232 secunde | OK. | 5 | 5 | ||
| 13 | 0.244 secunde | OK. | 5 | 5 | ||
| 14 | 0.248 secunde | OK. | 5 | 5 | ||
| 15 | 0.268 secunde | OK. | 5 | 5 | ||
| 16 | 0.268 secunde | OK. | 5 | 5 | ||
| 17 | 0.268 secunde | OK. | 5 | 5 | ||
| 18 | 0.272 secunde | OK. | 5 | 5 | ||
| 19 | 0.264 secunde | Raspuns gresit. | 5 | 0 | ||
| 20 | 0.268 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ă.