#include #include using namespace std; void bitStuffing(int N, int arr[]) { int brr[30]; int i, j, k; i = 0; j = 0; while (i < N) { if (arr[i] == 1) { int count = 1; brr[j] = arr[i]; for (k = i + 1; arr[k] == 1 && k < N && count < 5; k++) { j++; brr[j] = arr[k]; count++; if (count == 5) { j++; brr[j] = 0; } i = k; } } else { brr[j] = arr[i]; } i++; j++; } for (i = 0; i < j; i++) cout << brr[i]; cout<>n; int arr1[n]; for(int i=0;i>arr1[i]; } bitStuffing(n, arr1); int N; cin>>N; int arr2[N]; for(int i=0;i>arr2[i]; } bitDestuffing(N, arr2); return 0; }