fork(1) download
  1. #include <iostream>
  2. #include <set>
  3. #include <ctime>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. clock_t tstart = clock();
  9. multiset<int> a;
  10. for(int i = 0; i < 10000; ++i)
  11. a.insert(123);
  12. int sum = 0;
  13. for(int i = 0; i < 10000; ++i)
  14. sum += a.count(123);
  15. cout << sum << endl;
  16. cerr << (clock() - tstart) / double(CLOCKS_PER_SEC) << endl;
  17. return 0;
  18. }
Success #stdin #stdout 1.68s 2988KB
stdin
Standard input is empty
stdout
100000000