fork(2) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. vector<int> reg;
  5.  
  6. int getRegIndex(int num){
  7. reg.resize(reg.size()+1);
  8. return reg.size()-1;
  9. }
  10. int main()
  11. {
  12. reg.resize(1);
  13. for(int i=0;i<10;++i)
  14. {
  15. reg[getRegIndex(1)] = getRegIndex(2);
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 3268KB
stdin
Standard input is empty
stdout
Standard output is empty