#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 | #62310423 | Utilizator | |
| Fișier | maxq.cpp | Dimensiune | 3.14 KB |
| Data încărcării | 16 Ianuarie 2026, 23:00 | Scor/rezultat | 100 puncte |
maxq.cpp: In constructor 'node::node()': maxq.cpp:16:15: warning: 'node::totalSum' will be initialized after [-Wreorder] long long totalSum; ^ maxq.cpp:15:15: warning: 'long long int node::maxSum' [-Wreorder] long long 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:15: warning: 'node::totalSum' will be initialized after [-Wreorder] long long totalSum; ^ maxq.cpp:15:15: warning: 'long long int node::maxSum' [-Wreorder] long long 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.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.168 secunde | OK. | 5 | 5 | ||
| 6 | 0.168 secunde | OK. | 5 | 5 | ||
| 7 | 0.22 secunde | OK. | 5 | 5 | ||
| 8 | 0.216 secunde | OK. | 5 | 5 | ||
| 9 | 0.272 secunde | OK. | 5 | 5 | ||
| 10 | 0.268 secunde | OK. | 5 | 5 | ||
| 11 | 0.372 secunde | OK. | 5 | 5 | ||
| 12 | 0.372 secunde | OK. | 5 | 5 | ||
| 13 | 0.392 secunde | OK. | 5 | 5 | ||
| 14 | 0.384 secunde | OK. | 5 | 5 | ||
| 15 | 0.428 secunde | OK. | 5 | 5 | ||
| 16 | 0.44 secunde | OK. | 5 | 5 | ||
| 17 | 0.432 secunde | OK. | 5 | 5 | ||
| 18 | 0.444 secunde | OK. | 5 | 5 | ||
| 19 | 0.388 secunde | OK. | 5 | 5 | ||
| 20 | 0.424 secunde | OK. | 5 | 5 | ||
| Punctaj total | 100 | |||||
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ă.