////////////////////////////////////////
// 2018/04/23 14:31:31
// deque-begin
#include <iostream>
#include <deque>
#include <iterator>
#include <numeric>
using namespace std;
int main(){
deque<int> d(5);
iota(d.begin(), d.end(), 1);
deque<int>::iterator it = d.begin();
while (it != d.end()){
cout << *(it++) << " ";
}
cout << endl;
// third element of the deque
it = d.begin() + 2;
cout << *it << endl;
return 0;
}
/*
OUTPUT:
1 2 3 4 5
3
*/