#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 | #62310405 | Utilizator | |
| Fișier | maxq.cpp | Dimensiune | 3.12 KB |
| Data încărcării | 16 Ianuarie 2026, 22:58 | Scor/rezultat | Eroare de compilare |
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: At global scope: maxq.cpp:79:10: error: '::main' must return 'int' int main() ^ 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] } ^
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ă.