题目描述 Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backward, though, and he needs them all to face forward
题目描述 The bovine population boom down on the farm has caused seriouscongestion on the cow trails leading to the barn. Farmer John has decided toconduct a study to find the bottlenecks in order to reli