#4231
mingx
Se citește numărul natural nenul n
și o cifră x
. Să se determine cifra minimă, strict mai mare decât x
.
Concurs selectie clasa a 9-a Centru de Excelenta in Informatica - 2022 - Vaslui
Problema | mingx | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #47413646 | Utilizator | |
Fișier | mingx.cpp | Dimensiune | 1.91 KB |
Data încărcării | 12 Decembrie 2023, 12:18 | Scor / rezultat | Eroare de compilare |
mingx.cpp: In function 'int main()': mingx.cpp:10:5: error: reference to 'cin' is ambiguous cin >> n >> cer; ^ mingx.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("3cifre.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from mingx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ mingx.cpp:15:13: error: reference to 'cin' is ambiguous cin >> a[i]; ^ mingx.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("3cifre.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from mingx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ mingx.cpp:45:9: error: reference to 'cout' is ambiguous cout << mini << ' ' << fmin << ' ' << nrmin1 << ' ' << nrmin2 << endl; ^ mingx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from mingx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ mingx.cpp:46:9: error: reference to 'cout' is ambiguous cout << maxi << ' ' << fmax << ' ' << nrmax1 << ' ' << nrmax2; ^ mingx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from mingx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ mingx.cpp:52:13: error: reference to 'cin' is ambiguous cin >> a[i]; ^ mingx.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("3cifre.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from mingx.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ mingx.cpp:64:9: error: reference to 'cout' is ambiguous cout << maxi << endl; ^ mingx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from mingx.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ mingx.cpp:68:17: error: reference to 'cout' is ambiguous cout << i << " "; ^ mingx.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("3cifre.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from mingx.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 mingx 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ă.