SHARE
TWEET

Untitled

a guest Mar 24th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4.  
  5. int main() {
  6.     std::vector<int> v = {1,2,3,3,4,5};
  7.     auto it = std::unique(v.begin(), v.end());
  8.     std::cout << ((it == v.end()) ? "Unique\n" : "Duplicate(s)\n");
  9.     return 0;
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top