#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 | #50620777 | Utilizator | |
Fișier | partitiimultime.cpp | Dimensiune | 729 B |
Data încărcării | 17 Aprilie 2024, 13:45 | Scor / rezultat | Eroare de compilare |
partitiimultime.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("partitiimultime.in"); ^ partitiimultime.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("partitiimultime.out"); ^ 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: <typeprefixerror>cout ofstream cout("partitiimultime.out"); ^ In file included from partitiimultime.cpp:1:0: /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: <typeprefixerror>cout ofstream cout("partitiimultime.out"); ^ In file included from partitiimultime.cpp:1:0: /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: <typeprefixerror>cout ofstream cout("partitiimultime.out"); ^ In file included from partitiimultime.cpp:1:0: /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: <typeprefixerror>cin ifstream cin("partitiimultime.in"); ^ In file included from partitiimultime.cpp:1:0: /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ă.