#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 | #62310411 | Utilizator | |
| Fișier | maxq.cpp | Dimensiune | 3.13 KB |
| Data încărcării | 16 Ianuarie 2026, 22:59 | Scor/rezultat | 75 puncte |
maxq.cpp: In constructor 'node::node()': maxq.cpp:17:9: warning: 'node::totalSum' will be initialized after [-Wreorder] int totalSum; ^ maxq.cpp:16:9: warning: 'long long int node::maxSum' [-Wreorder] int maxSum; ^ maxq.cpp:18:5: warning: when initialized here [-Wreorder] node() :sumInceput(0), sumEnd(0), totalSum(0),maxSum(valmin) {}; ^ maxq.cpp: In constructor 'node::node(long long int&)': maxq.cpp:17:9: warning: 'node::totalSum' will be initialized after [-Wreorder] int totalSum; ^ maxq.cpp:16:9: warning: 'long long int node::maxSum' [-Wreorder] int maxSum; ^ maxq.cpp:19:5: warning: when initialized here [-Wreorder] node(int &val) :sumInceput(val), sumEnd(val), totalSum(val),maxSum(val) {}; ^ maxq.cpp: In function 'node updateAint(long long int, long long int, long long int, long long int, long long int&)': maxq.cpp:61:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.004 secunde | OK. | 5 | 5 | ||
| 2 | 0.004 secunde | OK. | 5 | 5 | ||
| 3 | 0.004 secunde | OK. | 5 | 5 | ||
| 4 | 0.004 secunde | OK. | 5 | 5 | ||
| 5 | 0.208 secunde | OK. | 5 | 5 | ||
| 6 | 0.208 secunde | OK. | 5 | 5 | ||
| 7 | 0.264 secunde | OK. | 5 | 5 | ||
| 8 | 0.26 secunde | OK. | 5 | 5 | ||
| 9 | 0.332 secunde | OK. | 5 | 5 | ||
| 10 | 0.324 secunde | OK. | 5 | 5 | ||
| 11 | 0.44 secunde | OK. | 5 | 5 | ||
| 12 | 0.444 secunde | OK. | 5 | 5 | ||
| 13 | 0.468 secunde | OK. | 5 | 5 | ||
| 14 | 0.464 secunde | OK. | 5 | 5 | ||
| 15 | Depășit | Limita de timp depășită | 5 | 0 | ||
| 16 | Depășit | Limita de timp depășită | 5 | 0 | ||
| 17 | Depășit | Limita de timp depășită | 5 | 0 | ||
| 18 | Depășit | Limita de timp depășită | 5 | 0 | ||
| 19 | 0.456 secunde | OK. | 5 | 5 | ||
| 20 | Depășit | Limita de timp depășită | 5 | 0 | ||
| Punctaj total | 75 | |||||
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ă.