Cow Gymnastics//队列//排位1 题目 In order to improve their physical fitness, the cows have taken up gymnastics! Farmer John designates his favorite cow Bessie to coach the N other cows and to assess the
Bucket Brigade//水题//排位2 题目 A fire has broken out on the farm, and the cows are rushing to try and put it out! The farm is described by a 10×10 grid of characters like this: [Math Processing Error]
Loan Repayment//二分 题目 Farmer John owes Bessie N gallons of milk (1≤N≤1012). He has to give her the milk within K days. However, he doesn’t want to give the milk away too quickly. On the other hand
Word Processor//队列//排位3 题目 Bessie the cow is working on an essay for her writing class. Since her handwriting is quite bad, she decides to type the essay using a word processor. The essay contain
Race//枚举 题目 Bessie is running a race of length K (1≤K≤109) meters. She starts running at a speed of 0 meters per second. In a given second, she can either increase her speed by 1 meter per second,
Photoshoot//枚举 题目 Farmer John is lining up his N cows (2≤N≤103), numbered 1…N, for a photoshoot. FJ initially planned for the i-th cow from the left to be the cow numbered ai, and wrote down the p
Milk Factory//暴力? 题目 The milk business is booming! Farmer John’s milk processing factory consists of N processing stations, conveniently numbered 1…N (1≤N≤100), and N−1 walkways, each connecting s
Where Am I?//枚举 题目 Farmer John has gone out for a walk down the road and thinks he may now be lost! Along the road there are N farms (1≤N≤100) in a row. Farms unfortunately do not have house numbe