|
|
back to boardWhy CE ?? #include<stdio.h> int main() { int N; scanf("%d", &N); int start; scanf("%d", &start); int sum = 1; for(int i = 1; i < N; i++) { int a; scanf("%d", &a); if(a == start) { sum++; } else { printf("%d %d ", sum, start); start = a; sum = 1; } } printf("%d %d ", sum, start); return 0; } |
|
|