#4534
SubmultimiInterval
Se dă un interval [a,b]
, a
și b
numere naturale. Determinaţi, în ordine lexicografică, submulțimile mulțimii de numere naturale {a, a+1, a+2, ... b}
.
Problema | SubmultimiInterval | Operații I/O |
![]() submultimiinterval.in /submultimiinterval.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51494628 | Utilizator | |
Fișier | submultimiinterval.cpp | Dimensiune | 981 B |
Data încărcării | 27 Iunie 2024, 22:35 | Scor / rezultat | Eroare de compilare |
submultimiinterval.cpp: In function 'int main()': submultimiinterval.cpp:12:5: error: reference to 'cin' is ambiguous cin >> n; ^ submultimiinterval.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("submultimiinterval.in"); ^ In file included from submultimiinterval.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ submultimiinterval.cpp:13:5: error: reference to 'cin' is ambiguous cin >> a >> b; ^ submultimiinterval.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("submultimiinterval.in"); ^ In file included from submultimiinterval.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ submultimiinterval.cpp: In function 'void back_it(int)': submultimiinterval.cpp:29:17: error: reference to 'cout' is ambiguous cout << v[i] << " "; ^ submultimiinterval.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("submultimiinterval.out"); ^ In file included from submultimiinterval.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ submultimiinterval.cpp:30:13: error: reference to 'cout' is ambiguous cout << "\n"; ^ submultimiinterval.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("submultimiinterval.out"); ^ In file included from submultimiinterval.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ submultimiinterval.cpp: In function 'void back_rec(int)': submultimiinterval.cpp:45:13: error: reference to 'cout' is ambiguous cout << v[j] << " "; ^ submultimiinterval.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("submultimiinterval.out"); ^ In file included from submultimiinterval.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ submultimiinterval.cpp:46:9: error: reference to 'cout' is ambiguous cout << "\n"; ^ submultimiinterval.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("submultimiinterval.out"); ^ In file included from submultimiinterval.cpp:1:0: /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 SubmultimiInterval 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ă.