Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5.     multiset<int> A;
  6.     multiset<int> B;
  7.     for (int i = 1; i <= 1000000; i++){
  8.         A.insert(i);
  9.         B.insert(2*i + 1);
  10.     }
  11.     auto t1 = clock();
  12.     swap(A, B);
  13.     auto t = clock() - t1;
  14.     cout << ((float) t)/CLOCKS_PER_SEC << endl;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement