#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 | #53434533 | Utilizator | |
Fișier | partitiimultime.cpp | Dimensiune | 717 B |
Data încărcării | 30 Octombrie 2024, 13:32 | Scor / rezultat | Eroare de compilare |
partitiimultime.cpp:3:1: error: 'ifstream' does not name a type ifstream cin("partitiimultime.in"); ^ partitiimultime.cpp:4:1: error: 'ofstream' does not name a type ofstream cout("partitiimultime.out"); ^ partitiimultime.cpp: In function 'int maxim(int)': partitiimultime.cpp:10:31: error: 'max' was not declared in this scope maxi = max(x[i] , maxi); ^ partitiimultime.cpp:10:31: note: suggested alternative: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from partitiimultime.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: 'std::max' max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ partitiimultime.cpp: In function 'void afisare()': partitiimultime.cpp:19:27: error: 'cout' was not declared in this scope if(x[j] == i) cout << j; ^ partitiimultime.cpp:19:27: note: suggested alternative: In file included from partitiimultime.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ partitiimultime.cpp:20:9: error: 'cout' was not declared in this scope cout << "*"; ^ partitiimultime.cpp:20:9: note: suggested alternative: In file included from partitiimultime.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ partitiimultime.cpp:22:5: error: 'cout' was not declared in this scope cout << '\n'; ^ partitiimultime.cpp:22:5: note: suggested alternative: In file included from partitiimultime.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ partitiimultime.cpp: In function 'int main()': partitiimultime.cpp:35:5: error: 'cin' was not declared in this scope cin >> n; ^ partitiimultime.cpp:35:5: note: suggested alternative: In file included from partitiimultime.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: '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ă.