fork(1) download
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. void A(int* array,size_t size)
  6. {
  7. size = std::remove(array,array+size,2) - array;
  8.  
  9. for(size_t i=0;i<size;++i)
  10. {
  11. std::cout << array[i] << std::endl;
  12. }
  13. }
  14.  
  15. int main() {
  16. std::vector<int> v={1,2,1,3,5,4,2,4,5,6,3,2,5,6,3};
  17. A(v.data(),v.size());
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
1
1
3
5
4
4
5
6
3
5
6
3