#2098
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 | #57797110 | Utilizator | |
Fișier | meteo.cpp | Dimensiune | 1.89 KB |
Data încărcării | 16 Aprilie 2025, 22:45 | Scor / rezultat | Eroare de compilare |
meteo.cpp:1:9: error: too many decimal points in number [17:04, 14.04.2025] Darius Enea Enea: #include <bits/stdc++.h> ^ meteo.cpp:1:39: error: stray '#' in program [17:04, 14.04.2025] Darius Enea Enea: #include <bits/stdc++.h> ^ meteo.cpp:45:9: error: too many decimal points in number [17:04, 14.04.2025] Darius Enea Enea: 60 de puncte ^ meteo.cpp:46:9: error: too many decimal points in number [17:04, 14.04.2025] Darius Enea Enea: #include <bits/stdc++.h> ^ meteo.cpp:46:39: error: stray '#' in program [17:04, 14.04.2025] Darius Enea Enea: #include <bits/stdc++.h> ^ meteo.cpp:1:1: error: expected unqualified-id before '[' token [17:04, 14.04.2025] Darius Enea Enea: #include <bits/stdc++.h> ^ meteo.cpp:4:1: error: 'ifstream' does not name a type ifstream fin("meteo.in"); ^ meteo.cpp:5:1: error: 'ofstream' does not name a type ofstream fout("meteo.out"); ^ meteo.cpp: In function 'int main()': meteo.cpp:10:5: error: 'fin' was not declared in this scope fin>>n; ^ meteo.cpp:34:13: error: 'fout' was not declared in this scope fout<<0<<'\n'; ^ meteo.cpp:38:13: error: 'fout' was not declared in this scope fout<<sirmax<<'\n'; ^ meteo.cpp: At global scope: meteo.cpp:45:1: error: expected unqualified-id before '[' token [17:04, 14.04.2025] Darius Enea Enea: 60 de puncte ^ meteo.cpp:49:1: error: 'ifstream' does not name a type ifstream fin("meteo.in"); ^ meteo.cpp:50:1: error: 'ofstream' does not name a type ofstream fout("meteo.out"); ^ meteo.cpp:52:5: error: redefinition of 'int n' int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:7:5: error: 'int n' previously declared here int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:52:13: error: redefinition of 'int v [1001]' int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:7:7: error: 'int v [1001]' previously declared here int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:52:15: error: redefinition of 'int i' int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:7:15: error: 'int i' previously declared here int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:52:17: error: redefinition of 'int sirmax' int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:7:17: error: 'int sirmax' previously defined here int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:52:26: error: redefinition of 'int ultimazi' int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:7:26: error: 'int ultimazi' previously declared here int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:52:35: error: redefinition of 'int alternare' int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp:7:35: error: 'int alternare' previously defined here int n,v[1001],i,sirmax=0,ultimazi,alternare=1; ^ meteo.cpp: In function 'int main()': meteo.cpp:53:5: error: redefinition of 'int main()' int main() ^ meteo.cpp:8:5: error: 'int main()' previously defined here int main() ^ meteo.cpp:55:5: error: 'fin' was not declared in this scope fin>>n; ^ meteo.cpp:79:13: error: 'fout' was not declared in this scope fout<<0<<'\n'; ^ meteo.cpp:83:13: error: 'fout' was not declared in this scope fout<<sirmax<<'\n'; ^
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ă.