Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- string s;
- int pre = 0;
- for(int i = 0; i < 100000000; i ++) {
- s.push_back('a');
- if(s.capacity() != pre) {
- if(pre != 0) cout << 1. * s.capacity() / pre << endl;
- pre = s.capacity();
- }
- }
- }
Add Comment
Please, Sign In to add comment