#include<bits/stdc++.h>
using namespace std;
// Either globally or in a single class:
static char buf[450 << 20];
void* operator new(size_t s) {
static size_t i = sizeof buf;
assert(s < i);
return (void*)&buf[i -= s];
}
void operator delete(void*) {}
vector<int>arr;
signed main(){
arr.resize(1,10);
int*pt=&arr[0];
cout<<*pt<<endl;
arr.resize(100);
cout<<*pt<<endl;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCi8vIEVpdGhlciBnbG9iYWxseSBvciBpbiBhIHNpbmdsZSBjbGFzczoKc3RhdGljIGNoYXIgYnVmWzQ1MCA8PCAyMF07CnZvaWQqIG9wZXJhdG9yIG5ldyhzaXplX3QgcykgewoJc3RhdGljIHNpemVfdCBpID0gc2l6ZW9mIGJ1ZjsKCWFzc2VydChzIDwgaSk7CglyZXR1cm4gKHZvaWQqKSZidWZbaSAtPSBzXTsKfQp2b2lkIG9wZXJhdG9yIGRlbGV0ZSh2b2lkKikge30KCnZlY3RvcjxpbnQ+YXJyOwoKc2lnbmVkIG1haW4oKXsKCWFyci5yZXNpemUoMSwxMCk7CglpbnQqcHQ9JmFyclswXTsKCWNvdXQ8PCpwdDw8ZW5kbDsKCWFyci5yZXNpemUoMTAwKTsKCWNvdXQ8PCpwdDw8ZW5kbDsKfQ==