fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main() {
  6. int v[] = {1, 2, 3, 4};
  7. rotate(begin(v), begin(v)+1, end(v));
  8. for(auto e: v) {
  9. cout << e;
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
2341