I want to add natural numbers from A to B in a set. Currently I am inserting each and every number from A to B, one by one in the set like this,

```
set<int> s;
for(int j=A; j<=B; j++)
    s.insert(j);

```

But it takes `O(n)` time (here `n = (B - A)+1`). Is there any pre-defined way in STL to do it in `O(1)` time?

Thanks