#include <stdio.h>
int main() {
int A[] = {1,1,1,1,1,1,1,2,1,1,3,2,2,4,5,2};
int i,j=0;
for (i=0;i<sizeof(A)/sizeof(int);i++) {
if (i == 0 || A[i-1] != A[i]) {
A[j++] = A[i];
}
}
for (i=0;i<j;i++) {
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkgewogICAgaW50IEFbXSA9IHsxLDEsMSwxLDEsMSwxLDIsMSwxLDMsMiwyLDQsNSwyfTsKICAgIGludCBpLGo9MDsKICAgIGZvciAoaT0wO2k8c2l6ZW9mKEEpL3NpemVvZihpbnQpO2krKykgewogICAgICAgIGlmIChpID09IDAgfHwgQVtpLTFdICE9IEFbaV0pIHsKICAgICAgICAgICAgQVtqKytdID0gQVtpXTsKICAgICAgICB9CiAgICB9CiAgICBmb3IgKGk9MDtpPGo7aSsrKSB7CiAgICAgICAgcHJpbnRmKCIlZCAiLCBBW2ldKTsKICAgIH0KICAgIHByaW50ZigiXG4iKTsKICAgIHJldHVybiAwOwp9