fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. void removeZero(std::vector<int> input)
  7. {
  8. auto endOfPositive = remove(input.begin(), input.end(), 0);
  9.  
  10. if(endOfPositive != input.end())
  11. {
  12. input.erase(endOfPositive, input.end());
  13. }
  14.  
  15. }
  16.  
  17. int main() {
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty