📜  不允许重复的列表 c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:58.023000             🧑  作者: Mango

代码示例1
#include
#include  
using namespace std;
int main()
{
    string s = "aaaabbbcccddd";
  // unordered_set doesn't allow for duplicates
    unordered_set t(s.begin(), s.end()); 
    string u(t.begin(), t.end());
    sort(u.begin(), u.end());
    cout << u << endl;
    return 0;
}