#4283
LowMem1
Să se determine valoarea maximă S
, care se poate obține prin însumarea a k
numere consecutive și secvența de numere care formează această sumă maximă.
Problema | LowMem1 | Operații I/O |
lowmem1.in /lowmem1.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #49183144 | Utilizator | |
Fișier | lowmem1.cpp | Dimensiune | 736 B |
Data încărcării | 19 Februarie 2024, 10:42 | Scor / rezultat | Eroare de compilare |
lowmem1.cpp: In function 'int main()': lowmem1.cpp:10:5: error: reference to 'cin' is ambiguous cin>>k; ^ lowmem1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin ("lowmem1.in"); ^ In file included from lowmem1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ lowmem1.cpp:13:9: error: reference to 'cin' is ambiguous cin>>x; ^ lowmem1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin ("lowmem1.in"); ^ In file included from lowmem1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ lowmem1.cpp:19:12: error: reference to 'cin' is ambiguous while (cin>>x) ^ lowmem1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin ("lowmem1.in"); ^ In file included from lowmem1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ lowmem1.cpp:34:5: error: reference to 'cout' is ambiguous cout<<smax<<'\n'; ^ lowmem1.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout ("lowmem1.out"); ^ In file included from lowmem1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ lowmem1.cpp:36:9: error: reference to 'cout' is ambiguous cout<<vmax[i]<<" "; ^ lowmem1.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout ("lowmem1.out"); ^ In file included from lowmem1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LowMem1 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ă.