#1330
PartitiiMultime
Fie n
un număr natural nenul și mulțimea A={1,2,3,...,n}
. Să se determine toate partițiile disjuncte ale mulțimii A
.
Problema | PartitiiMultime | Operații I/O |
partitiimultime.in /partitiimultime.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 2 MB
/
Stivă 2 MB
|
Id soluție | #53496976 | Utilizator | |
Fișier | partitiimultime.cpp | Dimensiune | 734 B |
Data încărcării | 02 Noiembrie 2024, 22:20 | Scor / rezultat | Eroare de compilare |
partitiimultime.cpp: In function 'void afisare()': partitiimultime.cpp:22:27: error: reference to 'cout' is ambiguous if(x[j] == i) cout << j; ^ partitiimultime.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("partitiimultime.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiimultime.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiimultime.cpp:23:9: error: reference to 'cout' is ambiguous cout << "*"; ^ partitiimultime.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("partitiimultime.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiimultime.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiimultime.cpp:25:5: error: reference to 'cout' is ambiguous cout << '\n'; ^ partitiimultime.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("partitiimultime.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiimultime.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiimultime.cpp: In function 'int main()': partitiimultime.cpp:40:5: error: reference to 'cin' is ambiguous cin >> n; ^ partitiimultime.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("partitiimultime.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiimultime.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PartitiiMultime 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ă.