#1876
SCLM2
Doi prieteni te provoacă la un joc. Cerința este simplă: trebuie doar să ghicești lungimea maximă a unui subșir crescător al șirului dat. Accepți provocarea?
Problema | SCLM2 | Operații I/O |
sclm2.in /sclm2.out
|
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53387112 | Utilizator | |
Fișier | sclm2.cpp | Dimensiune | 872 B |
Data încărcării | 27 Octombrie 2024, 15:46 | Scor / rezultat | Eroare de compilare |
sclm2.cpp: In function 'int BS(int, int*, int)': sclm2.cpp:18:5: error: 'retrun' was not declared in this scope retrun rez; ^ sclm2.cpp:18:12: error: expected ';' before 'rez' retrun rez; ^ sclm2.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ sclm2.cpp: In function 'int main()': sclm2.cpp:22:5: error: 'ifstream' was not declared in this scope ifstream in("sclm2.in"); ^ sclm2.cpp:22:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from sclm2.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ sclm2.cpp:22:14: error: expected ';' before 'in' ifstream in("sclm2.in"); ^ sclm2.cpp:23:5: error: 'ofstream' was not declared in this scope ofstream out("sclm2.out"); ^ sclm2.cpp:23:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from sclm2.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ sclm2.cpp:23:14: error: expected ';' before 'out' ofstream out("sclm2.out"); ^ sclm2.cpp:24:5: error: 'in' was not declared in this scope in >> n; ^ sclm2.cpp:38:5: error: 'cout' was not declared in this scope cout << lungime_curenta; ^ sclm2.cpp:40:5: error: 'out' was not declared in this scope out.close(); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SCLM2 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ă.