|
|
вернуться в форумAC 0.031, 108kb #include <iostream> #include <cstdio> using namespace std; 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; } // coding by Luka Bulatovic Re: AC 0.031, 108kb Послано hatred 26 авг 2011 01:23 and please delete your AC code Agree with hatred |
|
|