#1471
maxdiv
Scrieţi un program care afişează, pentru un şir dat format din n
numere naturale numărul de secvenţe maxdiv şi cea mai lungă secvenţă maxdiv.
Olimpiada Municipala Informatica Iasi 2016
Problema | maxdiv | Operații I/O |
maxdiv.in /maxdiv.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #54219075 | Utilizator | |
Fișier | maxdiv.cpp | Dimensiune | 1.48 KB |
Data încărcării | 22 Noiembrie 2024, 13:01 | Scor / rezultat | Eroare de compilare |
maxdiv.cpp: In function 'int main()': maxdiv.cpp:23:5: error: reference to 'cin' is ambiguous cin >> n >> cer; ^ maxdiv.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("maxdiv.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from maxdiv.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ maxdiv.cpp:28:13: error: reference to 'cin' is ambiguous cin >> v[i]; ^ maxdiv.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("maxdiv.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from maxdiv.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ maxdiv.cpp:35:9: error: reference to 'cout' is ambiguous cout << cnt - 1; ^ maxdiv.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("maxdiv.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from maxdiv.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ maxdiv.cpp:41:13: error: reference to 'cin' is ambiguous cin >> v[i]; ^ maxdiv.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("maxdiv.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from maxdiv.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ maxdiv.cpp:61:13: error: reference to 'cout' is ambiguous cout << v[i] << ' '; ^ maxdiv.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("maxdiv.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from maxdiv.cpp:1: /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 maxdiv 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ă.