SHARE
TWEET

Untitled

a guest Apr 9th, 2020 164 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. #include <iterator>
  4. #include <algorithm>
  5. int main(){
  6.         std::vector <int> arr{ std::istream_iterator<int>(std::cin), std::istream_iterator<int>() };
  7.         std::rotate(arr.begin(), arr.begin()+1, arr.end());
  8.         std::copy(arr.begin(), arr.end(), std::ostream_iterator<int>(std::cout, " "));
  9. }
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