Description: Subject content and requirements: n ants on slender 100 cm long straight pole. Some of them head to the left, some to the right.
Each ant can only crawl along the pole forward speed is 1 cm/sec.
When two ants meet, they will turn in the opposite direction while crawling.
These ants, ants have a cold. And when the other ants meet, the cold will spread to encounter ants.
Please work, when all the ants are crawling off the pole time, how many ants got sick.
[Data format]
The first line of input an integer n (1 <n <50), represents the total number of ants.
The next line is the n space-separated integers Xi (-100 <Xi <100), the absolute value of Xi, expressed ants leave the pole to the left endpoint. A positive value indicates the head to the right, a negative value indicates the head to the left, the data does not appear in a va
To Search:
File list (Check if you may need any files):
感冒蚂蚁
........\1.c
........\1.dsp
........\1.dsw
........\1.ncb
........\1.opt
........\1.plg
........\C实践教程2013.doc
........\Debug
........\.....\1.exe
........\.....\1.ilk
........\.....\1.obj
........\.....\1.pch
........\.....\1.pdb
........\.....\vc60.idb
........\.....\vc60.pdb
........\蚂蚁.txt