#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 | #53497021 | Utilizator | |
Fișier | partitiimultime.cpp | Dimensiune | 1.51 KB |
Data încărcării | 02 Noiembrie 2024, 22:23 | Scor / rezultat | Eroare de compilare |
partitiimultime.cpp: In function 'void generatePartitions(int)': partitiimultime.cpp:18:34: error: reference to 'partition' is ambiguous all_partitions.push_back(partition); ^ partitiimultime.cpp:12:21: note: candidates are: std::vector<std::vector<int> > partition vector<vector<int>> partition; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from partitiimultime.cpp:4: /usr/include/c++/4.8/bits/stl_algo.h:5260:5: note: template<class _BIter, class _Predicate> _BIter std::partition(_BIter, _BIter, _Predicate) partition(_ForwardIterator __first, _ForwardIterator __last, ^ partitiimultime.cpp:21:25: error: reference to 'partition' is ambiguous for (auto &subset : partition) { ^ partitiimultime.cpp:12:21: note: candidates are: std::vector<std::vector<int> > partition vector<vector<int>> partition; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from partitiimultime.cpp:4: /usr/include/c++/4.8/bits/stl_algo.h:5260:5: note: template<class _BIter, class _Predicate> _BIter std::partition(_BIter, _BIter, _Predicate) partition(_ForwardIterator __first, _ForwardIterator __last, ^ partitiimultime.cpp:26:5: error: reference to 'partition' is ambiguous partition.push_back({k}); ^ partitiimultime.cpp:12:21: note: candidates are: std::vector<std::vector<int> > partition vector<vector<int>> partition; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from partitiimultime.cpp:4: /usr/include/c++/4.8/bits/stl_algo.h:5260:5: note: template<class _BIter, class _Predicate> _BIter std::partition(_BIter, _BIter, _Predicate) partition(_ForwardIterator __first, _ForwardIterator __last, ^ partitiimultime.cpp:28:5: error: reference to 'partition' is ambiguous partition.pop_back(); ^ partitiimultime.cpp:12:21: note: candidates are: std::vector<std::vector<int> > partition vector<vector<int>> partition; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from partitiimultime.cpp:4: /usr/include/c++/4.8/bits/stl_algo.h:5260:5: note: template<class _BIter, class _Predicate> _BIter std::partition(_BIter, _BIter, _Predicate) partition(_ForwardIterator __first, _ForwardIterator __last, ^
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ă.