fork(2) download
  1. #include <iostream>
  2. #include <unordered_set>
  3. using namespace std;
  4.  
  5. int main() {
  6. unordered_set<int> mySet { 1 };
  7. mySet.reserve(10000);
  8. cout << mySet.load_factor() << endl;
  9. mySet.clear();
  10. mySet.insert(1);
  11. cout << mySet.load_factor() << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3232KB
stdin
Standard input is empty
stdout
9.73425e-05
9.73425e-05