#2098
Meteo
Centrul de meteorologie dintr-o ţară îndepărtată, aflată aproape de Polul Nord, doreşte să stabilească modul în care încălzirea globală afectează temperaturile din acea ţară. Ei notează pe parcursul a N zile consecutive temperaturile maxime zilnice şi sunt interesaţi să determine cea mai lungă perioadă continuă de timp în care temperaturile înregistrate în zile consecutive au alternat ca semn.
Olimpiada Municipala Informatica Iasi 2013
Problema | Meteo | Operații I/O |
meteo.in /meteo.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #48721425 | Utilizator | |
Fișier | meteo.cpp | Dimensiune | 933 B |
Data încărcării | 03 Februarie 2024, 10:37 | Scor / rezultat | Eroare de compilare |
meteo.cpp:2:1: error: expected unqualified-id before numeric constant 3include <fstream> ^ meteo.cpp: In function 'int main()': meteo.cpp:8:5: error: 'ifstream' was not declared in this scope ifstream cin("meteo.in"); ^ meteo.cpp:8:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from meteo.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ meteo.cpp:8:14: error: expected ';' before 'cin' ifstream cin("meteo.in"); ^ meteo.cpp:9:5: error: 'ofstream' was not declared in this scope ofstream cout("meteo.out"); ^ meteo.cpp:9:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from meteo.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ meteo.cpp:9:14: error: expected ';' before 'cout' ofstream cout("meteo.out"); ^ meteo.cpp:11:5: error: 'cin' was not declared in this scope cin >> n; ^ meteo.cpp:11:5: note: suggested alternative: In file included from meteo.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ meteo.cpp:42:5: error: 'cout' was not declared in this scope cout << maxcnt << endl; ^ meteo.cpp:42:5: note: suggested alternative: In file included from meteo.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ meteo.cpp:42:23: error: 'endl' was not declared in this scope cout << maxcnt << endl; ^ meteo.cpp:42:23: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from meteo.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Meteo 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ă.