Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # codeforces allocator
- const int max_memory = 13e7;
- int pos_memory = 0;
- char memory[max_memory];
- void* operator new(size_t n) {
- char *res = memory + pos_memory;
- pos_memory += n;
- assert(pos_memory <= max_memory);
- return (void*) res;
- }
- void operator delete(void *){}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement