fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. // Either globally or in a single class:
  5. static char buf[450 << 20];
  6. void* operator new(size_t s) {
  7. static size_t i = sizeof buf;
  8. assert(s < i);
  9. return (void*)&buf[i -= s];
  10. }
  11. void operator delete(void*) {}
  12.  
  13. int max(const int&x,const int&y){return x<y?y:x;}
  14. vector<int>v;
  15. int go(){
  16. while(v.size()<100)v.push_back(0);
  17. return -1;
  18. }
  19. int main() {
  20. v.resize(1,0);
  21. v[0]=1;
  22. int res=max(go(),v[0]);
  23. cout<<res<<endl;
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
1