|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||2||1||1||50.000%|
We have a new model of a modern urinal equipped with an optical sensor and a "flush" function. We don't have software for it, so we have to write a program that will calculate all the moments when it is time for flushing. The rules are:
Before and after given time interval, we consider that nobody is standing in front of the urinal.
First line of input contains three integers, K, L and N, 1 ≤ K, L ≤ 1000, 1 ≤ N ≤ 10,000.
Second line contains a sequence of N digits - zeros and ones. They are representing data received by sensors for a given time interval. Each digit tells us state of sensor in one second. Zero means that nobody was in front of the urinal during that second, and one means that somebody was in front of the urinal.
For each flushing, write the corresponding activation time in seconds counting from the beginning of the interval. These numbers must be sorted in ascending order, and written in consecutive lines.
If the toilet is never flushed, then just output the word 'NIKAD'.
1 1 3 101
3 1000 3 111
3 2 18 011101001101110001