fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. class mystruct{
  5. int a;
  6. bool b;
  7. char c;
  8. long d;
  9. std::vector<int> e;
  10. };
  11.  
  12. int main() {
  13. std::vector<mystruct> vec;
  14. for (int i = 0; i < 100000; i++)
  15. {
  16. mystruct ms;
  17. vec.push_back(ms);
  18. }
  19.  
  20. while (vec.size() > 90000)
  21. vec.erase(vec.begin());
  22. // your code goes here
  23. return 0;
  24. }
Success #stdin #stdout 3.48s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty